diff options
author | Björn Gustavsson <[email protected]> | 2015-07-06 11:27:45 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-07-06 13:38:18 +0200 |
commit | 1ffb2647ffcc29170b461c31c018c5d2b046beae (patch) | |
tree | f053f4c1b74d73b67d61e16bcc8ddef5923e3040 /erts | |
parent | c5755ae5ded3ba27dc5d884303ead232abc77a40 (diff) | |
download | otp-1ffb2647ffcc29170b461c31c018c5d2b046beae.tar.gz otp-1ffb2647ffcc29170b461c31c018c5d2b046beae.tar.bz2 otp-1ffb2647ffcc29170b461c31c018c5d2b046beae.zip |
Improve unpacking performance on x86_64
When unpacking operands on 64-bit CPUs, use a smarter mask to
help the compiler optimize the code.
It turns out that on x86_64, if we use the mask 0xFFFFUL (selecting
the 16 least significant bits), the compiler can combine a move and
a mask operation into the single insruction 'movzwl', which will
eliminate one instruction.
Diffstat (limited to 'erts')
-rwxr-xr-x | erts/emulator/utils/beam_makeops | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops index 06515c6346..f805e7cc64 100755 --- a/erts/emulator/utils/beam_makeops +++ b/erts/emulator/utils/beam_makeops @@ -629,8 +629,8 @@ sub emulator_output { print "\n"; print "#ifdef ARCH_64\n"; print "# define BEAM_WIDE_MASK 0xFFFFUL\n"; - print "# define BEAM_LOOSE_MASK 0x1FFFUL\n"; - print "# define BEAM_TIGHT_MASK 0x1FF8UL\n"; + print "# define BEAM_LOOSE_MASK 0xFFFFUL\n"; + print "# define BEAM_TIGHT_MASK 0xFFFFUL\n"; print "# define BEAM_WIDE_SHIFT 32\n"; print "# define BEAM_LOOSE_SHIFT 16\n"; print "# define BEAM_TIGHT_SHIFT 16\n"; |