summaryrefslogtreecommitdiffhomepage
path: root/ir/be/ia32
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-03-03 09:13:48 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2019-03-04 20:53:43 +0100
commitc8cf8d509fd41d301541a5e24ad6f19672a7e9af (patch)
treea6364b5334c59bd9d4400130a6bd56bfd8f22e08 /ir/be/ia32
parentc47bf936ead28b59953e34fe45b7005e5d778ea7 (diff)
be: Factor out code to emit an unconditional jump in each backend.
Diffstat (limited to 'ir/be/ia32')
-rw-r--r--ir/be/ia32/ia32_emitter.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ir/be/ia32/ia32_emitter.c b/ir/be/ia32/ia32_emitter.c
index 038f2f4..035b67a 100644
--- a/ir/be/ia32/ia32_emitter.c
+++ b/ir/be/ia32/ia32_emitter.c
@@ -596,6 +596,11 @@ static void ia32_emit_exc_label(const ir_node *node)
be_emit_irprintf("%lu", get_ia32_exc_label_id(node));
}
+static void emit_jmp(ir_node const *const node, ir_node const *const target)
+{
+ BE_EMIT_JMP(ia32, node, "jmp", target) {}
+}
+
/**
* Emits the jump sequence for a conditional jump (cmp + jmp_true + jmp_false)
*/
@@ -652,7 +657,7 @@ static void emit_ia32_Jcc(const ir_node *node)
be_emit_write_line();
}
- BE_EMIT_JMP(ia32, node, "jmp", projs.f) {}
+ emit_jmp(node, projs.f);
}
/**
@@ -716,7 +721,7 @@ static void emit_ia32_SwitchJmp(const ir_node *node)
*/
static void emit_ia32_Jmp(const ir_node *node)
{
- BE_EMIT_JMP(ia32, node, "jmp", node) {}
+ emit_jmp(node, node);
}
static void emit_ia32_asm_register(const arch_register_t *reg, char modifier,