Browse Source

No builtins for arm64.

Brucey 3 years ago
parent
commit
04f7f2e7f9
2 changed files with 10 additions and 1 deletions
  1. 4 0
      blitz.mod/blitz_ex.c
  2. 6 1
      blitz.mod/blitz_ex.h

+ 4 - 0
blitz.mod/blitz_ex.c

@@ -138,7 +138,11 @@ void bbExThrow( BBObject *p ){
 	--st->ex_sp;
 	st->ex_sp->ex = p;
 #ifdef __MINGW64__
+#ifdef __aarch64__
+	longjmp(st->ex_sp->buf, 1); // only allows status 1
+#else
 	__builtin_longjmp(st->ex_sp->buf, 1); // only allows status 1
+#endif
 #elif __APPLE__
 	_longjmp(st->ex_sp->buf, st->ex_sp->jmp_status);
 #else

+ 6 - 1
blitz.mod/blitz_ex.h

@@ -23,10 +23,15 @@ typedef jmp_buf BBExJmpBuf;
 
 // bbExTry can't be a function due to how setjmp works, so a macro it is
 #ifdef __MINGW64__
+#ifdef __aarch64__
+#define _jumpfunc setjmp
+#else
+#define _jumpfunc __builtin_setjmp
+#endif
 #define bbExTry \
 	BBExJmpBuf* buf = bbExEnter(); \
 	int jmp_status = 0; \
-	if(__builtin_setjmp(*buf)) jmp_status = bbExStatus(); \
+	if(_jumpfunc(*buf)) jmp_status = bbExStatus(); \
 	switch(jmp_status)
 #elif __APPLE__
 #define bbExTry \