summaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>2010-06-02 00:12:48 +0400
committerBlue Swirl <blauwirbel@gmail.com>2010-06-02 20:06:46 +0000
commit0e2fa9cab9c124788077de728f1e6744d1dd8bb2 (patch)
tree98d1e2425d41afaa041f2a1aed79782daa9f16d2 /target-sparc
parentb219094acea73602e3a5ef8bfb4f3ca60c2ee56f (diff)
downloadqemu-0e2fa9cab9c124788077de728f1e6744d1dd8bb2.tar.gz
qemu-0e2fa9cab9c124788077de728f1e6744d1dd8bb2.tar.bz2
qemu-0e2fa9cab9c124788077de728f1e6744d1dd8bb2.zip
sparc64: improve ldf and stf insns
- implemented block load/store primary/secondary with user privilege Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/op_helper.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index 842dbd3d19..470c710755 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -3164,6 +3164,20 @@ void helper_ldf_asi(target_ulong addr, int asi, int size, int rd)
}
return;
+ case 0x70: // Block load primary, user privilege
+ case 0x71: // Block load secondary, user privilege
+ if (rd & 7) {
+ raise_exception(TT_ILL_INSN);
+ return;
+ }
+ helper_check_align(addr, 0x3f);
+ for (i = 0; i < 16; i++) {
+ *(uint32_t *)&env->fpr[rd++] = helper_ld_asi(addr, asi & 0x1f, 4,
+ 0);
+ addr += 4;
+ }
+
+ return;
default:
break;
}
@@ -3210,6 +3224,20 @@ void helper_stf_asi(target_ulong addr, int asi, int size, int rd)
}
return;
+ case 0x70: // Block store primary, user privilege
+ case 0x71: // Block store secondary, user privilege
+ if (rd & 7) {
+ raise_exception(TT_ILL_INSN);
+ return;
+ }
+ helper_check_align(addr, 0x3f);
+ for (i = 0; i < 16; i++) {
+ val = *(uint32_t *)&env->fpr[rd++];
+ helper_st_asi(addr, val, asi & 0x1f, 4);
+ addr += 4;
+ }
+
+ return;
default:
break;
}