summaryrefslogtreecommitdiffstats
path: root/tcg/sparc
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-17 09:41:14 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-17 09:41:14 +0000
commit9a7f32283ca284ae0a2482a20d21f0cc08ac6dbf (patch)
tree0abde9d5bc6d807d85d0ca91555a414f22b58280 /tcg/sparc
parent572a9d4a880bdcc71c1880ee7416308259bda0d9 (diff)
downloadhqemu-9a7f32283ca284ae0a2482a20d21f0cc08ac6dbf.zip
hqemu-9a7f32283ca284ae0a2482a20d21f0cc08ac6dbf.tar.gz
Fix qemu_ld/st branches, constification, use orcc for tst synthetic op
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4466 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/sparc')
-rw-r--r--tcg/sparc/tcg-target.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c
index aaa7f4c..902ea27 100644
--- a/tcg/sparc/tcg-target.c
+++ b/tcg/sparc/tcg-target.c
@@ -198,8 +198,8 @@ static inline int tcg_target_const_match(tcg_target_long val,
#define ARITH_ADD (INSN_OP(2) | INSN_OP3(0x00))
#define ARITH_AND (INSN_OP(2) | INSN_OP3(0x01))
-#define ARITH_ANDCC (INSN_OP(2) | INSN_OP3(0x11))
#define ARITH_OR (INSN_OP(2) | INSN_OP3(0x02))
+#define ARITH_ORCC (INSN_OP(2) | INSN_OP3(0x12))
#define ARITH_XOR (INSN_OP(2) | INSN_OP3(0x03))
#define ARITH_SUB (INSN_OP(2) | INSN_OP3(0x04))
#define ARITH_SUBCC (INSN_OP(2) | INSN_OP3(0x14))
@@ -387,8 +387,8 @@ static void tcg_out_brcond(TCGContext *s, int cond,
int label_index)
{
if (const_arg2 && arg2 == 0)
- /* andcc r, r, %g0 */
- tcg_out_arith(s, TCG_REG_G0, arg1, arg1, ARITH_ANDCC);
+ /* orcc r, r, %g0 */
+ tcg_out_arith(s, TCG_REG_G0, TCG_REG_G0, arg1, ARITH_ORCC);
else
/* subcc r1, r2, %g0 */
tcg_out_arith(s, TCG_REG_G0, arg1, arg2, ARITH_SUBCC);
@@ -418,14 +418,14 @@ extern void __stl_mmu(void);
extern void __stq_mmu(void);
-static void *qemu_ld_helpers[4] = {
+static const void * const qemu_ld_helpers[4] = {
__ldb_mmu,
__ldw_mmu,
__ldl_mmu,
__ldq_mmu,
};
-static void *qemu_st_helpers[4] = {
+static const void * const qemu_st_helpers[4] = {
__stb_mmu,
__stw_mmu,
__stl_mmu,
@@ -531,7 +531,7 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args,
tcg_out32(s, 0);
/* label1: */
- *label1_ptr = (INSN_OP(0) | COND_A | INSN_OP2(0x2) |
+ *label1_ptr = (INSN_OP(0) | INSN_COND(COND_A, 0) | INSN_OP2(0x2) |
INSN_OFF22((unsigned long)label1_ptr -
(unsigned long)s->code_ptr));
@@ -599,7 +599,7 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args,
#if defined(CONFIG_SOFTMMU)
/* label2: */
- *label2_ptr = (INSN_OP(0) | COND_A | INSN_OP2(0x2) |
+ *label2_ptr = (INSN_OP(0) | INSN_COND(COND_A, 0) | INSN_OP2(0x2) |
INSN_OFF22((unsigned long)label2_ptr -
(unsigned long)s->code_ptr));
#endif
@@ -703,7 +703,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args,
tcg_out32(s, 0);
/* label1: */
- *label1_ptr = (INSN_OP(0) | COND_A | INSN_OP2(0x2) |
+ *label1_ptr = (INSN_OP(0) | INSN_COND(COND_A, 0) | INSN_OP2(0x2) |
INSN_OFF22((unsigned long)label1_ptr -
(unsigned long)s->code_ptr));
@@ -753,7 +753,7 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args,
#if defined(CONFIG_SOFTMMU)
/* label2: */
- *label2_ptr = (INSN_OP(0) | COND_A | INSN_OP2(0x2) |
+ *label2_ptr = (INSN_OP(0) | INSN_COND(COND_A, 0) | INSN_OP2(0x2) |
INSN_OFF22((unsigned long)label2_ptr -
(unsigned long)s->code_ptr));
#endif
OpenPOWER on IntegriCloud