aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-04-23 17:24:18 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-04-23 17:24:18 +0200
commit38384c6c5f66cf52d24ae6f48cc71bbe52611aa9 (patch)
tree48207f0afaa5fa1a188b9f5171b0674232916b1a /erts/emulator/beam
parent06a912c068f62e1e04ebb2aa2002d611b8cc31e3 (diff)
downloadotp-38384c6c5f66cf52d24ae6f48cc71bbe52611aa9.tar.gz
otp-38384c6c5f66cf52d24ae6f48cc71bbe52611aa9.tar.bz2
otp-38384c6c5f66cf52d24ae6f48cc71bbe52611aa9.zip
erts: Batch loads and stores for move_window
May lessen load/store latency.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/beam_emu.c48
1 files changed, 30 insertions, 18 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index b9b2094e6c..beec8967fc 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -1505,35 +1505,47 @@ void process_main(void)
OpCase(move_window3_xxxy): {
BeamInstr *next;
- Eterm *y;
+ Eterm xt0, xt1, xt2;
+ Eterm *y = (Eterm *)(((unsigned char *)E) + (Arg(3)));
PreFetch(4, next);
- y = (Eterm *)(((unsigned char *)E) + (Arg(3)));
- y[0] = xb(Arg(0));
- y[1] = xb(Arg(1));
- y[2] = xb(Arg(2));
+ xt0 = xb(Arg(0));
+ xt1 = xb(Arg(1));
+ xt2 = xb(Arg(2));
+ y[0] = xt0;
+ y[1] = xt1;
+ y[2] = xt2;
NextPF(4, next);
}
OpCase(move_window4_xxxxy): {
BeamInstr *next;
- Eterm *y;
+ Eterm xt0, xt1, xt2, xt3;
+ Eterm *y = (Eterm *)(((unsigned char *)E) + (Arg(4)));
PreFetch(5, next);
- y = (Eterm *)(((unsigned char *)E) + (Arg(4)));
- y[0] = xb(Arg(0));
- y[1] = xb(Arg(1));
- y[2] = xb(Arg(2));
- y[3] = xb(Arg(3));
+ xt0 = xb(Arg(0));
+ xt1 = xb(Arg(1));
+ xt2 = xb(Arg(2));
+ xt3 = xb(Arg(3));
+ y[0] = xt0;
+ y[1] = xt1;
+ y[2] = xt2;
+ y[3] = xt3;
NextPF(5, next);
}
OpCase(move_window5_xxxxxy): {
BeamInstr *next;
- Eterm *y;
+ Eterm xt0, xt1, xt2, xt3, xt4;
+ Eterm *y = (Eterm *)(((unsigned char *)E) + (Arg(5)));
PreFetch(6, next);
- y = (Eterm *)(((unsigned char *)E) + (Arg(5)));
- y[0] = xb(Arg(0));
- y[1] = xb(Arg(1));
- y[2] = xb(Arg(2));
- y[3] = xb(Arg(3));
- y[4] = xb(Arg(4));
+ xt0 = xb(Arg(0));
+ xt1 = xb(Arg(1));
+ xt2 = xb(Arg(2));
+ xt3 = xb(Arg(3));
+ xt4 = xb(Arg(4));
+ y[0] = xt0;
+ y[1] = xt1;
+ y[2] = xt2;
+ y[3] = xt3;
+ y[4] = xt4;
NextPF(6, next);
}