Commit fd55fe0f authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Implement binary emitter for ia32 popcnt.

parent 2b46e60b
...@@ -2986,6 +2986,12 @@ static void bemit_conv_i2i(const ir_node *node) ...@@ -2986,6 +2986,12 @@ static void bemit_conv_i2i(const ir_node *node)
bemit_0f_unop_reg(node, opcode, n_ia32_Conv_I2I_val); bemit_0f_unop_reg(node, opcode, n_ia32_Conv_I2I_val);
} }
static void bemit_popcnt(ir_node const *const node)
{
bemit8(0xF3);
bemit_0f_unop_reg(node, 0xB8, n_ia32_Popcnt_operand);
}
/** /**
* Emit a Push. * Emit a Push.
*/ */
...@@ -3648,6 +3654,7 @@ static void ia32_register_binary_emitters(void) ...@@ -3648,6 +3654,7 @@ static void ia32_register_binary_emitters(void)
register_emitter(op_ia32_Pop, bemit_pop); register_emitter(op_ia32_Pop, bemit_pop);
register_emitter(op_ia32_PopEbp, bemit_pop); register_emitter(op_ia32_PopEbp, bemit_pop);
register_emitter(op_ia32_PopMem, bemit_popmem); register_emitter(op_ia32_PopMem, bemit_popmem);
register_emitter(op_ia32_Popcnt, bemit_popcnt);
register_emitter(op_ia32_Push, bemit_push); register_emitter(op_ia32_Push, bemit_push);
register_emitter(op_ia32_RepPrefix, bemit_rep); register_emitter(op_ia32_RepPrefix, bemit_rep);
register_emitter(op_ia32_Rol, bemit_rol); register_emitter(op_ia32_Rol, bemit_rol);
......
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