diff options
author | Björn Gustavsson <[email protected]> | 2015-06-25 16:18:18 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-07-03 14:34:58 +0200 |
commit | 5e83d2ae89c731bd7e4c32b550150336008d2974 (patch) | |
tree | e1fa7b34f5591d364e19f3bac37a3f37d4ca796a /erts/emulator/beam/beam_load.c | |
parent | 62473daf8169a04a07409f344d938bc51a4536c3 (diff) | |
download | otp-5e83d2ae89c731bd7e4c32b550150336008d2974.tar.gz otp-5e83d2ae89c731bd7e4c32b550150336008d2974.tar.bz2 otp-5e83d2ae89c731bd7e4c32b550150336008d2974.zip |
Use a cheaper tag scheme for 'd' operands
Since 'd' operands can only either an X register or an Y register,
we only need a single bit to distinguish them. Furthermore, we can
pre-multiply the register number with the word size to speed up
address calculation.
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r-- | erts/emulator/beam/beam_load.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index 1e3690fcd6..a9d47eb7b0 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -2227,10 +2227,10 @@ load_code(LoaderState* stp) case 'd': /* Destination (x(0), x(N), y(N) */ switch (tag) { case TAG_x: - code[ci++] = make_loader_x_reg(tmp_op->a[arg].val); + code[ci++] = tmp_op->a[arg].val * sizeof(Eterm); break; case TAG_y: - code[ci++] = make_loader_y_reg(tmp_op->a[arg].val); + code[ci++] = tmp_op->a[arg].val * sizeof(Eterm) + 1; break; default: LoadError1(stp, "bad tag %d for destination", |