summaryrefslogtreecommitdiff
path: root/target-sparc/translate.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-07-07 20:50:33 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-07-07 20:50:33 +0000
commitdc011987f266878ad29009e4fdbc27f666ab31d2 (patch)
treed4cadb54e98c2234b8365b3c006888d602f474b5 /target-sparc/translate.c
parent6ef905f69cbeb03e8fe204d8aaa354d77f13a7d7 (diff)
downloadqemu-dc011987f266878ad29009e4fdbc27f666ab31d2.tar.gz
Use unsigned 32-bit load for ld/lduw
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3051 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/translate.c')
-rw-r--r--target-sparc/translate.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index a2f3d5bd34..074ed21fdd 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -470,6 +470,7 @@ OP_LD_TABLE(ldf);
OP_LD_TABLE(lddf);
#ifdef TARGET_SPARC64
+OP_LD_TABLE(lduw);
OP_LD_TABLE(ldsw);
OP_LD_TABLE(ldx);
OP_LD_TABLE(stx);
@@ -2810,7 +2811,11 @@ static void disas_sparc_insn(DisasContext * dc)
(xop > 0x2c && xop <= 0x33) || xop == 0x1f || xop == 0x3d) {
switch (xop) {
case 0x0: /* load word */
+#ifndef TARGET_SPARC64
gen_op_ldst(ld);
+#else
+ gen_op_ldst(lduw);
+#endif
break;
case 0x1: /* load unsigned byte */
gen_op_ldst(ldub);
@@ -2844,8 +2849,10 @@ static void disas_sparc_insn(DisasContext * dc)
goto illegal_insn;
if (!supervisor(dc))
goto priv_insn;
-#endif
gen_op_lda(insn, 1, 4, 0);
+#else
+ gen_op_lduwa(insn, 1, 4, 0);
+#endif
break;
case 0x11: /* load unsigned byte alternate */
#ifndef TARGET_SPARC64
@@ -2926,6 +2933,7 @@ static void disas_sparc_insn(DisasContext * dc)
(void) &gen_op_ldfa;
(void) &gen_op_lddfa;
#else
+ (void) &gen_op_lda;
#if !defined(CONFIG_USER_ONLY)
(void) &gen_op_cas;
(void) &gen_op_casx;