From: Brendan Hansen Date: Wed, 13 Dec 2023 16:54:54 +0000 (-0600) Subject: fixed: `ovm` backend crashing on MacOS X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=ad11ac8c800b3ac81efa2049c568f4fd198332a8;p=onyx.git fixed: `ovm` backend crashing on MacOS --- diff --git a/interpreter/build.sh b/interpreter/build.sh index 8d9fea72..aeab5a0a 100755 --- a/interpreter/build.sh +++ b/interpreter/build.sh @@ -2,7 +2,7 @@ # FLAGS="-g3 -O2 -DOVM_DEBUG=1 -fno-stack-protector" # FLAGS="-g3 -DOVM_VERBOSE=1" -FLAGS="-Ofast -fno-stack-protector" +FLAGS="-O3 -fno-stack-protector" LIBS="-pthread" TARGET="../shared/lib/$ONYX_ARCH/lib/libovmwasm.a" C_FILES="src/ovmwasm.c src/vm/*.c src/wasm/*.c src/debug/*.c" diff --git a/interpreter/src/vm/vm_instrs.h b/interpreter/src/vm/vm_instrs.h index be464ed4..97956aed 100644 --- a/interpreter/src/vm/vm_instrs.h +++ b/interpreter/src/vm/vm_instrs.h @@ -27,7 +27,7 @@ #define NEXT_OP \ OVMI_DEBUG_HOOK; \ instr = &code[state->pc++]; \ - return OVMI_DISPATCH_NAME[instr->full_instr & OVM_INSTR_MASK](instr, state, values, memory, code); + __attribute__((musttail)) return OVMI_DISPATCH_NAME[instr->full_instr & OVM_INSTR_MASK](instr, state, values, memory, code); #define VAL(loc) values[loc]