aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/macros.tab
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/macros.tab')
-rw-r--r--erts/emulator/beam/macros.tab19
1 files changed, 17 insertions, 2 deletions
diff --git a/erts/emulator/beam/macros.tab b/erts/emulator/beam/macros.tab
index bac96be7d3..959f7b28df 100644
--- a/erts/emulator/beam/macros.tab
+++ b/erts/emulator/beam/macros.tab
@@ -28,15 +28,30 @@ REFRESH_GEN_DEST() {
dst_ptr = REG_TARGET_PTR(dst);
}
+SET_I_REL(Offset) {
+ ASSERT(VALID_INSTR(* (Eterm *)((BeamInstr *) ($Offset) + JUMP_OFFSET)));
+ I = (BeamInstr *) $Offset + JUMP_OFFSET;
+}
+
+SET_CP_I_ABS(Target) {
+ c_p->i = $Target;
+ ASSERT(VALID_INSTR(* (Eterm *)c_p->i));
+}
+
+SET_REL_I(Dst, Offset) {
+ $Dst = (BeamInstr *) ($Offset) + JUMP_OFFSET;
+ ASSERT(VALID_INSTR(*$Dst));
+}
+
FAIL(Fail) {
//| -no_prefetch
- SET_I((BeamInstr *) $Fail);
+ $SET_I_REL($Fail);
Goto(*I);
}
JUMP(Fail) {
//| -no_next
- SET_I((BeamInstr *) $Fail);
+ $SET_I_REL($Fail);
Goto(*I);
}