diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-21 14:36:55 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-21 14:36:55 -0600 |
commit | 1571b6cba25df6d000b2539b8ba399839d15f9b6 (patch) | |
tree | a9b92e81d01e08e76477127d1e3dae07eaeca212 /tcg/sparc | |
parent | 54dcd0b37e3e4e9fb25cb4e9965d6ba45eb0d2b4 (diff) | |
parent | bc4268998d154b9b3cc86a7b6bd932cc974591c9 (diff) | |
download | qemu-1571b6cba25df6d000b2539b8ba399839d15f9b6.zip qemu-1571b6cba25df6d000b2539b8ba399839d15f9b6.tar.gz qemu-1571b6cba25df6d000b2539b8ba399839d15f9b6.tar.bz2 |
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'tcg/sparc')
-rw-r--r-- | tcg/sparc/tcg-target.c | 17 | ||||
-rw-r--r-- | tcg/sparc/tcg-target.h | 4 |
2 files changed, 9 insertions, 12 deletions
diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index fc3fd7f..5cd5a3b 100644 --- a/tcg/sparc/tcg-target.c +++ b/tcg/sparc/tcg-target.c @@ -306,7 +306,8 @@ static void tcg_out_arithc(TCGContext *s, int rd, int rs1, | (val2const ? INSN_IMM13(val2) : INSN_RS2(val2))); } -static inline void tcg_out_mov(TCGContext *s, TCGType type, int ret, int arg) +static inline void tcg_out_mov(TCGContext *s, TCGType type, + TCGReg ret, TCGReg arg) { tcg_out_arith(s, ret, arg, TCG_REG_G0, ARITH_OR); } @@ -333,7 +334,7 @@ static inline void tcg_out_movi_imm32(TCGContext *s, int ret, uint32_t arg) } static inline void tcg_out_movi(TCGContext *s, TCGType type, - int ret, tcg_target_long arg) + TCGReg ret, tcg_target_long arg) { /* All 32-bit constants, as well as 64-bit constants with no high bits set go through movi_imm32. */ @@ -398,8 +399,8 @@ static inline void tcg_out_ldst_asi(TCGContext *s, int ret, int addr, INSN_ASI(asi) | INSN_RS2(addr)); } -static inline void tcg_out_ld(TCGContext *s, TCGType type, int ret, - int arg1, tcg_target_long arg2) +static inline void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, + TCGReg arg1, tcg_target_long arg2) { if (type == TCG_TYPE_I32) tcg_out_ldst(s, ret, arg1, arg2, LDUW); @@ -407,8 +408,8 @@ static inline void tcg_out_ld(TCGContext *s, TCGType type, int ret, tcg_out_ldst(s, ret, arg1, arg2, LDX); } -static inline void tcg_out_st(TCGContext *s, TCGType type, int arg, - int arg1, tcg_target_long arg2) +static inline void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg, + TCGReg arg1, tcg_target_long arg2) { if (type == TCG_TYPE_I32) tcg_out_ldst(s, arg, arg1, arg2, STW); @@ -472,11 +473,9 @@ static inline void tcg_out_nop(TCGContext *s) static void tcg_out_branch_i32(TCGContext *s, int opc, int label_index) { - int32_t val; TCGLabel *l = &s->labels[label_index]; if (l->has_value) { - val = l->u.value - (tcg_target_long)s->code_ptr; tcg_out32(s, (INSN_OP(0) | INSN_COND(opc, 0) | INSN_OP2(0x2) | INSN_OFF22(l->u.value - (unsigned long)s->code_ptr))); } else { @@ -488,11 +487,9 @@ static void tcg_out_branch_i32(TCGContext *s, int opc, int label_index) #if TCG_TARGET_REG_BITS == 64 static void tcg_out_branch_i64(TCGContext *s, int opc, int label_index) { - int32_t val; TCGLabel *l = &s->labels[label_index]; if (l->has_value) { - val = l->u.value - (tcg_target_long)s->code_ptr; tcg_out32(s, (INSN_OP(0) | INSN_COND(opc, 0) | INSN_OP2(0x1) | (0x5 << 19) | INSN_OFF19(l->u.value - (unsigned long)s->code_ptr))); diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h index 1464ef4..c3fe131 100644 --- a/tcg/sparc/tcg-target.h +++ b/tcg/sparc/tcg-target.h @@ -27,7 +27,7 @@ #define TCG_TARGET_NB_REGS 32 -enum { +typedef enum { TCG_REG_G0 = 0, TCG_REG_G1, TCG_REG_G2, @@ -60,7 +60,7 @@ enum { TCG_REG_I5, TCG_REG_I6, TCG_REG_I7, -}; +} TCGReg; #define TCG_CT_CONST_S11 0x100 #define TCG_CT_CONST_S13 0x200 |