aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/op_helper.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-30 19:38:12 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-30 19:38:12 +0000
commit3391c81801c867bc8f4dd6ce32766e4e8345813b (patch)
tree2a33edea8cbf8c8ae4e1b0580c5e1ea8aa9ba0ba /target-sparc/op_helper.c
parentee0b03fd85652ddd04d3499f03e6821732862308 (diff)
downloadqemu-3391c81801c867bc8f4dd6ce32766e4e8345813b.zip
qemu-3391c81801c867bc8f4dd6ce32766e4e8345813b.tar.gz
qemu-3391c81801c867bc8f4dd6ce32766e4e8345813b.tar.bz2
Fix Sparc64 ldfa, lddfa, stfa, and stdfa instructions
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3298 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/op_helper.c')
-rw-r--r--target-sparc/op_helper.c73
1 files changed, 73 insertions, 0 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index eea4a63..fa51cde 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -1126,6 +1126,79 @@ void helper_st_asi(int asi, int size)
}
}
#endif /* CONFIG_USER_ONLY */
+
+void helper_ldf_asi(int asi, int size, int rd)
+{
+ target_ulong tmp_T0 = T0, tmp_T1 = T1;
+ unsigned int i;
+
+ switch (asi) {
+ case 0xf0: // Block load primary
+ case 0xf1: // Block load secondary
+ case 0xf8: // Block load primary LE
+ case 0xf9: // Block load secondary LE
+ for (i = 0; i < 8; i++) {
+ helper_ld_asi(asi & 0x8f, 8, 0);
+ *((int64_t *)&DT0) = T1;
+ T0 += 8;
+ }
+ T0 = tmp_T0;
+ T1 = tmp_T1;
+
+ return;
+ default:
+ break;
+ }
+
+ helper_ld_asi(asi, size, 0);
+ switch(size) {
+ default:
+ case 4:
+ *((uint32_t *)&FT0) = T1;
+ break;
+ case 8:
+ *((int64_t *)&DT0) = T1;
+ break;
+ }
+ T1 = tmp_T1;
+}
+
+void helper_stf_asi(int asi, int size, int rd)
+{
+ target_ulong tmp_T0 = T0, tmp_T1 = T1;
+ unsigned int i;
+
+ switch (asi) {
+ case 0xf0: // Block store primary
+ case 0xf1: // Block store secondary
+ case 0xf8: // Block store primary LE
+ case 0xf9: // Block store secondary LE
+ for (i = 0; i < 8; i++) {
+ T1 = *((int64_t *)&DT0);
+ helper_st_asi(asi & 0x8f, 8);
+ T0 += 8;
+ }
+ T0 = tmp_T0;
+ T1 = tmp_T1;
+
+ return;
+ default:
+ break;
+ }
+
+ switch(size) {
+ default:
+ case 4:
+ T1 = *((uint32_t *)&FT0);
+ break;
+ case 8:
+ T1 = *((int64_t *)&DT0);
+ break;
+ }
+ helper_st_asi(asi, size);
+ T1 = tmp_T1;
+}
+
#endif /* TARGET_SPARC64 */
#ifndef TARGET_SPARC64