Commit 486125c2 authored by Matthias Braun's avatar Matthias Braun
Browse files

ia32: Fixup binary emit test mode

parent 794dfaf4
......@@ -2604,6 +2604,13 @@ static void bemit_push(const ir_node *node)
}
}
static void bemit_pusheax(ir_node const *const node)
{
(void)node;
arch_register_t const *const reg = &ia32_registers[REG_EAX];
bemit8(0x50 + reg->encoding);
}
/**
* Emit a Pop.
*/
......@@ -2621,8 +2628,6 @@ static void bemit_popmem(const ir_node *node)
static void bemit_call(const ir_node *node)
{
(void)node;
panic("bemit_call NIY");
#if 0
ir_node *proc = get_irn_n(node, n_ia32_Call_addr);
......@@ -2632,6 +2637,8 @@ static void bemit_call(const ir_node *node)
} else {
bemit_unop(node, 0xFF, 2, n_ia32_Call_addr);
}
#else
ia32_emitf(node, "call %*AS3");
#endif
}
......@@ -3042,17 +3049,25 @@ static void bemit_fxch(const ir_node *node)
bemit_fop_reg(node, 0xD9, 0xC8);
}
static void bemit_ignore(ir_node const *const node)
{
(void)node;
}
static void ia32_register_binary_emitters(void)
{
/* first clear the generic function pointer for all ops */
ir_clear_opcodes_generic_func();
/* benode emitter */
be_set_emitter(op_Phi, bemit_ignore);
be_set_emitter(op_be_Asm, emit_ia32_Asm); // TODO implement binary emitter
be_set_emitter(op_be_Copy, bemit_copy);
be_set_emitter(op_be_CopyKeep, bemit_copy);
be_set_emitter(op_be_IncSP, bemit_incsp);
be_set_emitter(op_be_Keep, bemit_ignore);
be_set_emitter(op_be_Perm, bemit_perm);
be_set_emitter(op_be_Start, bemit_ignore);
be_set_emitter(op_ia32_Return, bemit_return);
be_set_emitter(op_ia32_Adc, bemit_adc);
be_set_emitter(op_ia32_Add, bemit_add);
......@@ -3107,6 +3122,7 @@ static void ia32_register_binary_emitters(void)
be_set_emitter(op_ia32_PopMem, bemit_popmem);
be_set_emitter(op_ia32_Popcnt, bemit_popcnt);
be_set_emitter(op_ia32_Push, bemit_push);
be_set_emitter(op_ia32_PushEax, bemit_pusheax);
be_set_emitter(op_ia32_Rol, bemit_rol);
be_set_emitter(op_ia32_RolMem, bemit_rolmem);
be_set_emitter(op_ia32_Ror, bemit_ror);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment