فهرست منبع

Merge pull request #857 from lioncash/vfp

vfp: Handle accesses to the VFP media feature registers
Lioncash 11 سال پیش
والد
کامیت
54e69b89b9
3فایلهای تغییر یافته به همراه8 افزوده شده و 4 حذف شده
  1. 2 0
      src/core/arm/skyeye_common/arm_regformat.h
  2. 4 0
      src/core/arm/skyeye_common/vfp/vfp.cpp
  3. 2 4
      src/core/arm/skyeye_common/vfp/vfpinstr.cpp

+ 2 - 0
src/core/arm/skyeye_common/arm_regformat.h

@@ -59,6 +59,8 @@ enum {
     VFP_FPSID,
     VFP_FPSID,
     VFP_FPSCR,
     VFP_FPSCR,
     VFP_FPEXC,
     VFP_FPEXC,
+    VFP_MVFR0,
+    VFP_MVFR1,
 
 
     // Not an actual register.
     // Not an actual register.
     // All VFP system registers should be defined above this.
     // All VFP system registers should be defined above this.

+ 4 - 0
src/core/arm/skyeye_common/vfp/vfp.cpp

@@ -33,6 +33,10 @@ unsigned VFPInit(ARMul_State* state)
     state->VFP[VFP_FPEXC] = 0;
     state->VFP[VFP_FPEXC] = 0;
     state->VFP[VFP_FPSCR] = 0;
     state->VFP[VFP_FPSCR] = 0;
 
 
+    // ARM11 MPCore feature register values.
+    state->VFP[VFP_MVFR0] = 0x11111111;
+    state->VFP[VFP_MVFR1] = 0;
+
     return 0;
     return 0;
 }
 }
 
 

+ 2 - 4
src/core/arm/skyeye_common/vfp/vfpinstr.cpp

@@ -1141,12 +1141,10 @@ VMRS_INST:
                 cpu->Reg[inst_cream->Rt] = cpu->VFP[VFP_FPSID];
                 cpu->Reg[inst_cream->Rt] = cpu->VFP[VFP_FPSID];
                 break;
                 break;
             case 6:
             case 6:
-                /* MVFR1, VFPv3 only ? */
-                LOG_TRACE(Core_ARM11, "\tr%d <= MVFR1 unimplemented\n", inst_cream->Rt);
+                cpu->Reg[inst_cream->Rt] = cpu->VFP[VFP_MVFR1];
                 break;
                 break;
             case 7:
             case 7:
-                /* MVFR0, VFPv3 only? */
-                LOG_TRACE(Core_ARM11, "\tr%d <= MVFR0 unimplemented\n", inst_cream->Rt);
+                cpu->Reg[inst_cream->Rt] = cpu->VFP[VFP_MVFR0];
                 break;
                 break;
             case 8:
             case 8:
                 cpu->Reg[inst_cream->Rt] = cpu->VFP[VFP_FPEXC];
                 cpu->Reg[inst_cream->Rt] = cpu->VFP[VFP_FPEXC];