aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/instrs.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-11-29 15:13:05 +0100
committerBjörn Gustavsson <[email protected]>2017-11-30 12:43:22 +0100
commit67fd015394185302f769378c2c5e47bddbdc22ea (patch)
tree51957138935856b761194837d7e0f7b5c67f8485 /erts/emulator/beam/instrs.tab
parent93fde6744a0c94c2d31f99cb1f9019ff6e98f83d (diff)
downloadotp-67fd015394185302f769378c2c5e47bddbdc22ea.tar.gz
otp-67fd015394185302f769378c2c5e47bddbdc22ea.tar.bz2
otp-67fd015394185302f769378c2c5e47bddbdc22ea.zip
Stop trying to maximize the use of x(0)
X register 0 used to be mapped to a hardware register, and therefore faster than the other registers. Because of that, the compiler tried to use x(0) as much as possible as a temporary register. That was changed a few releases ago. X register 0 is now placed in the array of all X registers and has no special speed advantage compared to the other registers. Remove the code in the compiler that attempts to use x(0) as much as possible. As a result, the following type of instruction will be much less frequent: {put_list,Src,{x,0},{x,0}} Instead, the following type of instruction will be more frequent: {put_list,Src,{x,X},{x,X}} (Where X is an arbitrary X register.) Update the runtime system to specialize that kind of put_list instruction.
Diffstat (limited to 'erts/emulator/beam/instrs.tab')
-rw-r--r--erts/emulator/beam/instrs.tab7
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/instrs.tab b/erts/emulator/beam/instrs.tab
index c17d1a8f69..d934abb217 100644
--- a/erts/emulator/beam/instrs.tab
+++ b/erts/emulator/beam/instrs.tab
@@ -542,6 +542,13 @@ put_list(Hd, Tl, Dst) {
HTOP += 2;
}
+update_list(Hd, Dst) {
+ HTOP[0] = $Hd;
+ HTOP[1] = $Dst;
+ $Dst = make_list(HTOP);
+ HTOP += 2;
+}
+
i_put_tuple := i_put_tuple.make.fill;
i_put_tuple.make(Dst) {