aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/trace_instrs.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-09-02 14:35:39 +0200
committerBjörn Gustavsson <[email protected]>2017-09-13 12:20:56 +0200
commit8650d6d811bb99490e1a75cbbab684a673a950ba (patch)
tree39924f5d0b31516b7e1d54e0755a6e7cc47c2b78 /erts/emulator/beam/trace_instrs.tab
parentbffbd4fb504e9551fc7feb9177ef0a2394c00cae (diff)
downloadotp-8650d6d811bb99490e1a75cbbab684a673a950ba.tar.gz
otp-8650d6d811bb99490e1a75cbbab684a673a950ba.tar.bz2
otp-8650d6d811bb99490e1a75cbbab684a673a950ba.zip
Refactor instructions to support relative jumps
Introduce new macros that can be used for relative jumps and use them consistently. Test that everything works by using a non-zero constant JUMP_OFFSET. The loader subtracts JUMP_OFFSET from loaded labels, and all instructions that use 'f' operands add it back.
Diffstat (limited to 'erts/emulator/beam/trace_instrs.tab')
-rw-r--r--erts/emulator/beam/trace_instrs.tab2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/trace_instrs.tab b/erts/emulator/beam/trace_instrs.tab
index c28bc8ebcb..b10442c5e7 100644
--- a/erts/emulator/beam/trace_instrs.tab
+++ b/erts/emulator/beam/trace_instrs.tab
@@ -94,7 +94,7 @@ i_yield() {
c_p->arg_reg[0] = am_true;
c_p->arity = 1; /* One living register (the 'true' return value) */
SWAPOUT;
- c_p->i = $NEXT_INSTRUCTION;
+ $SET_CP_I_ABS($NEXT_INSTRUCTION);
c_p->current = NULL;
goto do_schedule;
//| -no_next