From cfe29c3386477b76a1daf4d631b1178dc7359a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 7 Sep 2017 11:54:22 +0200 Subject: Pack sequences of trailing 'f' operands Pack sequences of trailing 'f' operands for instructions such at jump_on_val or i_select_val_lins. --- erts/emulator/beam/select_instrs.tab | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'erts/emulator/beam/select_instrs.tab') 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); -- cgit v1.2.3