void test_emit_mov_reg_memlocal(void) { struct stack_slot *slot, *wide_slot; struct stack_frame *frame; frame = alloc_stack_frame(32, 32); slot = get_local_slot(frame, 0); wide_slot = get_local_slot(frame, 31); assert_emit_insn_3(0x89, 0x45, ARG_OFFSET(0), reg_memlocal_insn(INSN_MOV_REG_MEMLOCAL, &VAR_EAX, slot)); assert_emit_insn_6(0x89, 0x9d, ARG_OFFSET(31), 0x00, 0x00, 0x00, reg_memlocal_insn(INSN_MOV_REG_MEMLOCAL, &VAR_EBX, wide_slot)); free_stack_frame(frame); }
void test_reg_membase_uses_source_and_target(void) { struct stack_slot slot; assert_uses_r0(reg_memlocal_insn(INSN_MOV_REG_MEMLOCAL, &r0, &slot)); }