aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/ops.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-12-16 11:15:11 +0100
committerBjörn Gustavsson <[email protected]>2011-01-17 15:23:45 +0100
commit92f1409c0e9b986780be483976de3cbbff3bab34 (patch)
tree2d2cfc46c32cd6995b82b7000582523fb0d09e35 /erts/emulator/beam/ops.tab
parentd5ab5485430c00734a79068fe0eee7bd4f87cf00 (diff)
downloadotp-92f1409c0e9b986780be483976de3cbbff3bab34.tar.gz
otp-92f1409c0e9b986780be483976de3cbbff3bab34.tar.bz2
otp-92f1409c0e9b986780be483976de3cbbff3bab34.zip
Eliminate the "put_list c n Dst" instructions
Since the literal (constant) pool was introduced in R12, the BEAM compiler will never generate a "put_list Const [] Dst" instruction (it will instead generate a "move [Const] Dst" instruction).
Diffstat (limited to 'erts/emulator/beam/ops.tab')
-rw-r--r--erts/emulator/beam/ops.tab9
1 files changed, 7 insertions, 2 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 0b2e2dca83..426cdef24d 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -376,16 +376,21 @@ i_put_tuple r I
i_put_tuple x I
i_put_tuple y I
+#
+# The instruction "put_list Const [] Dst" will not be generated by
+# the current BEAM compiler. But until R15A, play it safe by handling
+# that instruction with the following transformation.
+#
+put_list Const=c n Dst => move Const x | put_list x n Dst
+
%macro:put_list PutList -pack -gen_dest
put_list x n x
put_list y n x
put_list x x x
put_list y x x
-put_list c n x
put_list x x r
put_list y r r
-put_list c n r
put_list y y x
put_list x y x