aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-04-24 16:43:04 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-04-27 10:50:15 +0200
commitdd4d7667f5ab60c76567a6f3d814b3b64583280a (patch)
tree14d8b61e5a4ee3c5bdc88f7cfe88f6ca612064ac /erts
parentb58b4718012cfb848dad3106b2ab22c08997c639 (diff)
downloadotp-dd4d7667f5ab60c76567a6f3d814b3b64583280a.tar.gz
otp-dd4d7667f5ab60c76567a6f3d814b3b64583280a.tar.bz2
otp-dd4d7667f5ab60c76567a6f3d814b3b64583280a.zip
erts: Add move2 specialization for common move patterns
Common pattern seen in SSL: move y x | move r x -> move2 move r x | move y x -> move2 Common pattern seen in SSL and Compiler: move x r | move x x -> move2
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/ops.tab8
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 7f7b0baacc..22c7f14f0c 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -330,9 +330,13 @@ move X1=x Y1=y | move X2=x Y2=y => move2 X1 Y1 X2 Y2
move Y1=y X1=x | move Y2=y X2=x => move2 Y1 X1 Y2 X2
move X1=x X2=x | move X3=x X4=x => move2 X1 X2 X3 X4
+move S1=x S2=r | move S3=x S4=x => move2 S1 S2 S3 S4
move S1=x S2=r | move X1=x Y1=y => move2 S1 S2 X1 Y1
move S1=y S2=r | move X1=x Y1=y => move2 S1 S2 X1 Y1
+move Y1=y X1=x | move S1=r D1=x => move2 Y1 X1 S1 D1
+move S1=r D1=x | move Y1=y X1=x => move2 S1 D1 Y1 X1
+
move2 X1=x Y1=y X2=x Y2=y | move X3=x Y3=y => move3 X1 Y1 X2 Y2 X3 Y3
move2 Y1=y X1=x Y2=y X2=x | move Y3=y X3=x => move3 Y1 X1 Y2 X2 Y3 X3
move2 X1=x X2=x X3=x X4=x | move X5=x X6=x => move3 X1 X2 X3 X4 X5 X6
@@ -348,10 +352,14 @@ move2 x y x y
move2 y x y x
move2 x x x x
+move2 x r x x
+
move2 x r x y
move2 r y x y
move2 y r x y
+move2 r x y x
+move2 y x r x
%macro: move3 Move3
move3 x y x y x y