aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/select_instrs.tab
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/select_instrs.tab')
-rw-r--r--erts/emulator/beam/select_instrs.tab6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/select_instrs.tab b/erts/emulator/beam/select_instrs.tab
index da6b7dbe62..6b59f02925 100644
--- a/erts/emulator/beam/select_instrs.tab
+++ b/erts/emulator/beam/select_instrs.tab
@@ -150,7 +150,8 @@ select_val_lin.execute(N) {
}
if (vs[ix] == select_val) {
- Eterm offset = *($NEXT_INSTRUCTION + $N + ix);
+ Sint32* jump_tab = (Sint32 *) ($NEXT_INSTRUCTION + $N);
+ Eterm offset = jump_tab[ix];
$JUMP(offset);
} else {
$JUMP(*select_fail);
@@ -161,7 +162,8 @@ JUMP_ON_VAL(Fail, Index, N, Base) {
if (is_small($Index)) {
$Index = (Uint) (signed_val($Index) - $Base);
if ($Index < $N) {
- $JUMP((($NEXT_INSTRUCTION)[$Index]));
+ Sint32* jump_tab = (Sint32 *) ($NEXT_INSTRUCTION);
+ $JUMP(jump_tab[$Index]);
}
}
$FAIL($Fail);