qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 6/8] sparc64: improve ldf and stf insns


From: Igor V. Kovalenko
Subject: [Qemu-devel] [PATCH 6/8] sparc64: improve ldf and stf insns
Date: Wed, 02 Jun 2010 00:12:48 +0400
User-agent: StGit/0.15

From: Igor V. Kovalenko <address@hidden>

- implemented block load/store primary/secondary with user privilege

Signed-off-by: Igor V. Kovalenko <address@hidden>
---
 target-sparc/op_helper.c |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index b9af52b..83067ae 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -3161,6 +3161,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;
     }
@@ -3211,6 +3225,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;
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]