aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_emu.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-11-30 10:44:42 +0100
committerBjörn Gustavsson <[email protected]>2011-11-30 10:44:42 +0100
commitf7c881208154dcae6d0b753a160eb771710bd47a (patch)
tree14f19e6524a33f5e2d664e162ecf0d3b21d0d959 /erts/emulator/beam/beam_emu.c
parent8e5ef86ee21cb6491287710606a7525f45cc50fc (diff)
parent3c36d2c5f75827f098a691dfcf534ab3b95d7bd9 (diff)
downloadotp-f7c881208154dcae6d0b753a160eb771710bd47a.tar.gz
otp-f7c881208154dcae6d0b753a160eb771710bd47a.tar.bz2
otp-f7c881208154dcae6d0b753a160eb771710bd47a.zip
Merge branch 'bjorn/llvm-issues/OTP-9712'
* bjorn/llvm-issues/OTP-9712: INSTALL.md: Update build instructions for Lion Fix clang linking problem configure: Define NO_JUMP_TABLE if all we have is llvm-gcc beam_emu.c: Eliminate warnings when NO_JUMP_TABLE is defined beam_emu.c: Use the correct void* type for computed gotos MacOS X: Completely remove obsolete -no-cpp-precomp option
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r--erts/emulator/beam/beam_emu.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index 68e6383f7f..9b2b47ffb7 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -45,7 +45,7 @@
/* #define HARDDEBUG 1 */
#if defined(NO_JUMP_TABLE)
-# define OpCase(OpCode) case op_##OpCode: lb_##OpCode
+# define OpCase(OpCode) case op_##OpCode
# define CountCase(OpCode) case op_count_##OpCode
# define OpCode(OpCode) ((Uint*)op_##OpCode)
# define Goto(Rel) {Go = (int)(Rel); goto emulator_loop;}
@@ -53,7 +53,7 @@
#else
# define OpCase(OpCode) lb_##OpCode
# define CountCase(OpCode) lb_count_##OpCode
-# define Goto(Rel) goto *(Rel)
+# define Goto(Rel) goto *((void *)Rel)
# define LabelAddr(Label) &&Label
# define OpCode(OpCode) (&&lb_##OpCode)
#endif
@@ -199,7 +199,7 @@ do { \
} \
} while (0)
-#define ClauseFail() goto lb_jump_f
+#define ClauseFail() goto jump_f
#define SAVE_CP(X) \
do { \
@@ -2540,6 +2540,7 @@ void process_main(void)
lb_Cl_error: {
if (Arg(0) != 0) {
OpCase(jump_f): {
+ jump_f:
SET_I((BeamInstr *) Arg(0));
Goto(*I);
}
@@ -3113,7 +3114,7 @@ void process_main(void)
/* Fall through */
OpCase(error_action_code): {
- no_error_handler:
+ handle_error:
reg[0] = r(0);
SWAPOUT;
I = handle_error(c_p, NULL, reg, NULL);
@@ -3274,7 +3275,7 @@ void process_main(void)
OpCase(i_func_info_IaaI): {
c_p->freason = EXC_FUNCTION_CLAUSE;
c_p->current = I + 2;
- goto lb_error_action_code;
+ goto handle_error;
}
OpCase(try_case_end_s):
@@ -4960,7 +4961,7 @@ void process_main(void)
if (I) {
Goto(*I);
}
- goto no_error_handler;
+ goto handle_error;
}