Use SINGLE_OPERAND for instructions emitters that only have a single operand. This doesn't change functionality as we've been lucky so far and TWO_OPERAND passes the right operand to the emitter functions.
Cc: Arthur HUILLET <arthur.huil...@free.fr> Signed-off-by: Pekka Enberg <penb...@cs.helsinki.fi> --- arch/x86/emit-code.c | 54 +++++++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 27 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index d57a4fa..1aa1bce 100644 --- a/arch/x86/emit-code.c +++ b/arch/x86/emit-code.c @@ -1156,29 +1156,29 @@ static void emit_fdiv_64_reg_reg(struct buffer *buf, struct operand *src, struct emit_reg_reg(buf, 0x5e, dest, src); } -static void emit_fld_membase(struct buffer *buf, struct operand *src) +static void emit_fld_membase(struct buffer *buf, struct operand *operand) { - __emit_membase(buf, 0xd9, mach_reg(&src->base_reg), src->disp, 0); + __emit_membase(buf, 0xd9, mach_reg(&operand->base_reg), operand->disp, 0); } -static void emit_fld_64_membase(struct buffer *buf, struct operand *src) +static void emit_fld_64_membase(struct buffer *buf, struct operand *operand) { - __emit_membase(buf, 0xdd, mach_reg(&src->base_reg), src->disp, 0); + __emit_membase(buf, 0xdd, mach_reg(&operand->base_reg), operand->disp, 0); } -static void emit_fld_memlocal(struct buffer *buf, struct operand *src) +static void emit_fld_memlocal(struct buffer *buf, struct operand *operand) { - __emit_membase(buf, 0xd9, MACH_REG_EBP, slot_offset(src->slot), 0); + __emit_membase(buf, 0xd9, MACH_REG_EBP, slot_offset(operand->slot), 0); } -static void emit_fld_64_memlocal(struct buffer *buf, struct operand *src) +static void emit_fld_64_memlocal(struct buffer *buf, struct operand *operand) { - __emit_membase(buf, 0xdd, MACH_REG_EBP, slot_offset_64(src->slot), 0); + __emit_membase(buf, 0xdd, MACH_REG_EBP, slot_offset_64(operand->slot), 0); } -static void emit_fild_64_membase(struct buffer *buf, struct operand *src) +static void emit_fild_64_membase(struct buffer *buf, struct operand *operand) { - __emit_membase(buf, 0xdf, mach_reg(&src->base_reg), src->disp, 5); + __emit_membase(buf, 0xdf, mach_reg(&operand->base_reg), operand->disp, 5); } static void emit_fldcw_membase(struct buffer *buf, struct operand *operand) @@ -1196,24 +1196,24 @@ static void emit_fistp_64_membase(struct buffer *buf, struct operand *operand) __emit_membase(buf, 0xdf, mach_reg(&operand->base_reg), operand->disp, 7); } -static void emit_fstp_membase(struct buffer *buf, struct operand *dest) +static void emit_fstp_membase(struct buffer *buf, struct operand *operand) { - __emit_membase(buf, 0xd9, mach_reg(&dest->base_reg), dest->disp, 3); + __emit_membase(buf, 0xd9, mach_reg(&operand->base_reg), operand->disp, 3); } -static void emit_fstp_memlocal(struct buffer *buf, struct operand *dest) +static void emit_fstp_memlocal(struct buffer *buf, struct operand *operand) { - __emit_membase(buf, 0xd9, MACH_REG_EBP, slot_offset(dest->slot), 3); + __emit_membase(buf, 0xd9, MACH_REG_EBP, slot_offset(operand->slot), 3); } -static void emit_fstp_64_membase(struct buffer *buf, struct operand *dest) +static void emit_fstp_64_membase(struct buffer *buf, struct operand *operand) { - __emit_membase(buf, 0xdd, mach_reg(&dest->base_reg), dest->disp, 3); + __emit_membase(buf, 0xdd, mach_reg(&operand->base_reg), operand->disp, 3); } -static void emit_fstp_64_memlocal(struct buffer *buf, struct operand *dest) +static void emit_fstp_64_memlocal(struct buffer *buf, struct operand *operand) { - __emit_membase(buf, 0xdd, MACH_REG_EBP, slot_offset_64(dest->slot), 3); + __emit_membase(buf, 0xdd, MACH_REG_EBP, slot_offset_64(operand->slot), 3); } static void emit_add_membase_reg(struct buffer *buf, struct operand *src, struct operand *dest) @@ -1654,18 +1654,18 @@ struct emitter emitters[] = { DECL_EMITTER(INSN_FMUL_64_MEMDISP_REG, emit_fmul_64_memdisp_reg, TWO_OPERANDS), DECL_EMITTER(INSN_FDIV_REG_REG, emit_fdiv_reg_reg, TWO_OPERANDS), DECL_EMITTER(INSN_FDIV_64_REG_REG, emit_fdiv_64_reg_reg, TWO_OPERANDS), - DECL_EMITTER(INSN_FLD_MEMBASE, emit_fld_membase, TWO_OPERANDS), - DECL_EMITTER(INSN_FLD_MEMLOCAL, emit_fld_memlocal, TWO_OPERANDS), - DECL_EMITTER(INSN_FLD_64_MEMBASE, emit_fld_64_membase, TWO_OPERANDS), - DECL_EMITTER(INSN_FLD_64_MEMLOCAL, emit_fld_64_memlocal, TWO_OPERANDS), + DECL_EMITTER(INSN_FLD_MEMBASE, emit_fld_membase, SINGLE_OPERAND), + DECL_EMITTER(INSN_FLD_MEMLOCAL, emit_fld_memlocal, SINGLE_OPERAND), + DECL_EMITTER(INSN_FLD_64_MEMBASE, emit_fld_64_membase, SINGLE_OPERAND), + DECL_EMITTER(INSN_FLD_64_MEMLOCAL, emit_fld_64_memlocal, SINGLE_OPERAND), DECL_EMITTER(INSN_FLDCW_MEMBASE, emit_fldcw_membase, SINGLE_OPERAND), - DECL_EMITTER(INSN_FILD_64_MEMBASE, emit_fild_64_membase, TWO_OPERANDS), + DECL_EMITTER(INSN_FILD_64_MEMBASE, emit_fild_64_membase, SINGLE_OPERAND), DECL_EMITTER(INSN_FISTP_64_MEMBASE, emit_fistp_64_membase, SINGLE_OPERAND), DECL_EMITTER(INSN_FNSTCW_MEMBASE, emit_fnstcw_membase, SINGLE_OPERAND), - DECL_EMITTER(INSN_FSTP_MEMBASE, emit_fstp_membase, TWO_OPERANDS), - DECL_EMITTER(INSN_FSTP_MEMLOCAL, emit_fstp_memlocal, TWO_OPERANDS), - DECL_EMITTER(INSN_FSTP_64_MEMBASE, emit_fstp_64_membase, TWO_OPERANDS), - DECL_EMITTER(INSN_FSTP_64_MEMLOCAL, emit_fstp_64_memlocal, TWO_OPERANDS), + DECL_EMITTER(INSN_FSTP_MEMBASE, emit_fstp_membase, SINGLE_OPERAND), + DECL_EMITTER(INSN_FSTP_MEMLOCAL, emit_fstp_memlocal, SINGLE_OPERAND), + DECL_EMITTER(INSN_FSTP_64_MEMBASE, emit_fstp_64_membase, SINGLE_OPERAND), + DECL_EMITTER(INSN_FSTP_64_MEMLOCAL, emit_fstp_64_memlocal, SINGLE_OPERAND), DECL_EMITTER(INSN_CONV_GPR_TO_FPU, emit_conv_gpr_to_fpu, TWO_OPERANDS), DECL_EMITTER(INSN_CONV_GPR_TO_FPU64, emit_conv_gpr_to_fpu64, TWO_OPERANDS), DECL_EMITTER(INSN_CONV_FPU_TO_GPR, emit_conv_fpu_to_gpr, TWO_OPERANDS), -- 1.6.0.4 ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel