aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/op.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-18 21:12:17 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-18 21:12:17 +0000
commit725cb90bf7e2487fe5aa5621cc10afe6d169e310 (patch)
tree8d2ffe0b21338890a08f140696e910a1ecb8d960 /target-sparc/op.c
parenta3c259974ea93b160112a9c61101e667664443c3 (diff)
sparc64 fixes (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2062 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/op.c')
-rw-r--r--target-sparc/op.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/target-sparc/op.c b/target-sparc/op.c
index f6d417f475..7ea209ea86 100644
--- a/target-sparc/op.c
+++ b/target-sparc/op.c
@@ -1514,6 +1514,9 @@ void OPPROTO op_saved(void)
env->cansave++;
if (env->otherwin == 0)
env->canrestore--;
+ else
+ env->otherwin--;
+ FORCE_RET();
}
void OPPROTO op_restored(void)
@@ -1525,6 +1528,7 @@ void OPPROTO op_restored(void)
env->cansave--;
else
env->otherwin--;
+ FORCE_RET();
}
void OPPROTO op_popc(void)
@@ -1571,3 +1575,23 @@ void OPPROTO op_st_asi()
helper_st_asi(PARAM1, PARAM2, PARAM3);
}
+#ifdef TARGET_SPARC64
+void OPPROTO op_alignaddr()
+{
+ uint64_t tmp;
+
+ tmp = T0 + T1;
+ env->gsr &= ~7ULL;
+ env->gsr |= tmp & 7ULL;
+ T0 = tmp & ~7ULL;
+}
+
+void OPPROTO op_faligndata()
+{
+ uint64_t tmp;
+
+ tmp = (*((uint64_t *)&DT0)) << ((env->gsr & 7) * 8);
+ tmp |= (*((uint64_t *)&DT1)) >> (64 - (env->gsr & 7) * 8);
+ (*((uint64_t *)&DT0)) = tmp;
+}
+#endif