aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/select_instrs.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-09-07 11:54:22 +0200
committerBjörn Gustavsson <[email protected]>2017-09-14 10:16:15 +0200
commitcfe29c3386477b76a1daf4d631b1178dc7359a40 (patch)
tree38aea5e63eff57b7c0efd092c405e6daeee5dd29 /erts/emulator/beam/select_instrs.tab
parent41b832fd133dd2bfebe858c42ae51db8f0ac0584 (diff)
downloadotp-cfe29c3386477b76a1daf4d631b1178dc7359a40.tar.gz
otp-cfe29c3386477b76a1daf4d631b1178dc7359a40.tar.bz2
otp-cfe29c3386477b76a1daf4d631b1178dc7359a40.zip
Pack sequences of trailing 'f' operands
Pack sequences of trailing 'f' operands for instructions such at jump_on_val or i_select_val_lins.
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);