Patchwork [v2,5/8] SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for ldfa

login
register
mail settings
Submitter Tsuneo Saito
Date July 14, 2011, 9:41 a.m.
Message ID <1310636503-8956-6-git-send-email-tsnsaito@gmail.com>
Download mbox | patch
Permalink /patch/104648/
State New
Headers show

Comments

Tsuneo Saito - July 14, 2011, 9:41 a.m.
Support UA2007 block load ASIs for ldfa instructions.

Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>
---
 target-sparc/op_helper.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

Patch

diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c
index fe71829..b76ffb6 100644
--- a/target-sparc/op_helper.c
+++ b/target-sparc/op_helper.c
@@ -3353,6 +3353,10 @@  void helper_ldf_asi(target_ulong addr, int asi, int size, int rd)
         }
 
         return;
+    case 0x16: /* UA2007 Block load primary, user privilege */
+    case 0x17: /* UA2007 Block load secondary, user privilege */
+    case 0x1e: /* UA2007 Block load primary LE, user privilege */
+    case 0x1f: /* UA2007 Block load secondary LE, user privilege */
     case 0x70: // Block load primary, user privilege
     case 0x71: // Block load secondary, user privilege
         if (rd & 7) {
@@ -3361,7 +3365,7 @@  void helper_ldf_asi(target_ulong addr, int asi, int size, int rd)
         }
         helper_check_align(addr, 0x3f);
         for (i = 0; i < 16; i++) {
-            *(uint32_t *)&env->fpr[rd++] = helper_ld_asi(addr, asi & 0x1f, 4,
+            *(uint32_t *)&env->fpr[rd++] = helper_ld_asi(addr, asi & 0x19, 4,
                                                          0);
             addr += 4;
         }