diff options
author | Björn Gustavsson <[email protected]> | 2019-03-03 07:46:38 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-03-06 15:42:42 +0100 |
commit | ca68fe8277c5f534d32c8d5bf0e5ba66ebf124e0 (patch) | |
tree | 6480242577f44f99ef466a56bd1bd30310929765 | |
parent | 85b3b9d1930b0addad09c56576608c5133a4976f (diff) | |
download | otp-ca68fe8277c5f534d32c8d5bf0e5ba66ebf124e0.tar.gz otp-ca68fe8277c5f534d32c8d5bf0e5ba66ebf124e0.tar.bz2 otp-ca68fe8277c5f534d32c8d5bf0e5ba66ebf124e0.zip |
Introduce move_window2 and remove move2_par_xyxy
-rw-r--r-- | erts/emulator/beam/instrs.tab | 9 | ||||
-rw-r--r-- | erts/emulator/beam/ops.tab | 9 |
2 files changed, 13 insertions, 5 deletions
diff --git a/erts/emulator/beam/instrs.tab b/erts/emulator/beam/instrs.tab index fc88cab22f..5b81517359 100644 --- a/erts/emulator/beam/instrs.tab +++ b/erts/emulator/beam/instrs.tab @@ -512,6 +512,15 @@ move_shift(Src, SD, D) { $SD = V; } +move_window2(S1, S2, D) { + Eterm xt0, xt1; + Eterm* y = &$D; + xt0 = $S1; + xt1 = $S2; + y[0] = xt0; + y[1] = xt1; +} + move_window3(S1, S2, S3, D) { Eterm xt0, xt1, xt2; Eterm* y = &$D; diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab index 9237fa1069..448412c903 100644 --- a/erts/emulator/beam/ops.tab +++ b/erts/emulator/beam/ops.tab @@ -285,6 +285,9 @@ move_window/6 move X1=x Y1=y | move X2=x Y2=y | move X3=x Y3=y | succ(Y1,Y2) | succ(Y2,Y3) => \ move_window X1 X2 X3 Y1 Y3 +move X1=x Y1=y | move X2=x Y2=y | succ(Y1,Y2) => \ + move_window2 X1 X2 Y1 + move_window X1=x X2=x X3=x Y1=y Y3=y | move X4=x Y4=y | succ(Y3,Y4) => \ move_window X1 X2 X3 X4 Y1 Y4 @@ -294,6 +297,7 @@ move_window X1=x X2=x X3=x X4=x Y1=y Y4=y | move X5=x Y5=y | succ(Y4,Y5) => \ move_window X1=x X2=x X3=x Y1=y Y3=y => move_window3 X1 X2 X3 Y1 move_window X1=x X2=x X3=x X4=x Y1=y Y4=y => move_window4 X1 X2 X3 X4 Y1 +move_window2 x x y move_window3 x x x y move_window4 x x x x y move_window5 x x x x x y @@ -346,11 +350,6 @@ move X1=x X2=x | move X3=x X4=x | independent_moves(X1, X2, X3, X4) => \ move2_par X1 X2 X3 X4 move2_par x x x x -# move2_par x y x y - -move X1=x Y1=y | move X2=x Y2=y => move2_par X1 Y1 X2 Y2 -move2_par x y x y - # move2_par x x x y move X1=x X2=x | move X3=x Y1=y | independent_moves(X1, X2, X3, Y1) => \ |