diff options
author | Björn Gustavsson <[email protected]> | 2017-09-19 11:56:45 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-10-05 12:37:57 +0200 |
commit | f88bd45a2c76f84a16b004922945579898cc35ac (patch) | |
tree | 22ffd02d93cd1d0f7b03780e84f3c5ada3a86139 /erts/emulator/beam/beam_emu.c | |
parent | 22d2a00aebf0eef878af95d8b7598adbfca06e7e (diff) | |
download | otp-f88bd45a2c76f84a16b004922945579898cc35ac.tar.gz otp-f88bd45a2c76f84a16b004922945579898cc35ac.tar.bz2 otp-f88bd45a2c76f84a16b004922945579898cc35ac.zip |
Pack operands into the instruction word
On 64-bit machines where the C code is always at address below 4Gb,
pack one or more operands into the instruction word.
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r-- | erts/emulator/beam/beam_emu.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index 6a45087a34..73c4e3532b 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -234,15 +234,18 @@ void** beam_ops; #define fb(N) ((Sint)(Sint32)(N)) #define jb(N) ((Sint)(Sint32)(N)) #define tb(N) (N) -#define xb(N) (*(Eterm *) (((unsigned char *)reg) + (N))) -#define yb(N) (*(Eterm *) (((unsigned char *)E) + (N))) +#define xb(N) (*ADD_BYTE_OFFSET(reg, N)) +#define yb(N) (*ADD_BYTE_OFFSET(E, N)) #define Sb(N) (*REG_TARGET_PTR(N)) #define lb(N) (*(double *) (((unsigned char *)&(freg[0].fd)) + (N))) #define Qb(N) (N) #define Ib(N) (N) + #define x(N) reg[N] #define y(N) E[N] #define r(N) x(N) +#define Q(N) (N*sizeof(Eterm *)) +#define l(N) (freg[N].fd) /* * Check that we haven't used the reductions and jump to function pointed to by |