]> Git Repo - qemu.git/blobdiff - target-mips/op.c
Enable 64-bit FPU only for NewABI. Spotted by Vince Weaver.
[qemu.git] / target-mips / op.c
index cece7f1f23ac4f75d3886d0f058aab92e4e1f797..00b779967eaafc00680df0800f5979f87017d124 100644 (file)
 #include "fop_template.c"
 #undef FTN
 
-void op_dup_T0 (void)
-{
-    T2 = T0;
-    FORCE_RET();
-}
-
 void op_load_HI (void)
 {
-    T0 = env->HI[PARAM1][env->current_tc];
+    T0 = env->HI[env->current_tc][PARAM1];
     FORCE_RET();
 }
 
 void op_store_HI (void)
 {
-    env->HI[PARAM1][env->current_tc] = T0;
+    env->HI[env->current_tc][PARAM1] = T0;
     FORCE_RET();
 }
 
 void op_load_LO (void)
 {
-    T0 = env->LO[PARAM1][env->current_tc];
+    T0 = env->LO[env->current_tc][PARAM1];
     FORCE_RET();
 }
 
 void op_store_LO (void)
 {
-    env->LO[PARAM1][env->current_tc] = T0;
+    env->LO[env->current_tc][PARAM1] = T0;
     FORCE_RET();
 }
 
@@ -368,8 +362,8 @@ void op_div (void)
 void op_div (void)
 {
     if (T1 != 0) {
-        env->LO[0][env->current_tc] = (int32_t)((int64_t)(int32_t)T0 / (int32_t)T1);
-        env->HI[0][env->current_tc] = (int32_t)((int64_t)(int32_t)T0 % (int32_t)T1);
+        env->LO[env->current_tc][0] = (int32_t)((int64_t)(int32_t)T0 / (int32_t)T1);
+        env->HI[env->current_tc][0] = (int32_t)((int64_t)(int32_t)T0 % (int32_t)T1);
     }
     FORCE_RET();
 }
@@ -378,8 +372,8 @@ void op_div (void)
 void op_divu (void)
 {
     if (T1 != 0) {
-        env->LO[0][env->current_tc] = (int32_t)((uint32_t)T0 / (uint32_t)T1);
-        env->HI[0][env->current_tc] = (int32_t)((uint32_t)T0 % (uint32_t)T1);
+        env->LO[env->current_tc][0] = (int32_t)((uint32_t)T0 / (uint32_t)T1);
+        env->HI[env->current_tc][0] = (int32_t)((uint32_t)T0 % (uint32_t)T1);
     }
     FORCE_RET();
 }
@@ -447,8 +441,8 @@ void op_ddivu (void)
 void op_ddivu (void)
 {
     if (T1 != 0) {
-        env->LO[0][env->current_tc] = T0 / T1;
-        env->HI[0][env->current_tc] = T0 % T1;
+        env->LO[env->current_tc][0] = T0 / T1;
+        env->HI[env->current_tc][0] = T0 % T1;
     }
     FORCE_RET();
 }
@@ -869,26 +863,26 @@ void op_mulshiu (void)
 
 static always_inline uint64_t get_HILO (void)
 {
-    return ((uint64_t)env->HI[0][env->current_tc] << 32) |
-            ((uint64_t)(uint32_t)env->LO[0][env->current_tc]);
+    return ((uint64_t)env->HI[env->current_tc][0] << 32) |
+            ((uint64_t)(uint32_t)env->LO[env->current_tc][0]);
 }
 
 static always_inline void set_HILO (uint64_t HILO)
 {
-    env->LO[0][env->current_tc] = (int32_t)(HILO & 0xFFFFFFFF);
-    env->HI[0][env->current_tc] = (int32_t)(HILO >> 32);
+    env->LO[env->current_tc][0] = (int32_t)(HILO & 0xFFFFFFFF);
+    env->HI[env->current_tc][0] = (int32_t)(HILO >> 32);
 }
 
 static always_inline void set_HIT0_LO (uint64_t HILO)
 {
-    env->LO[0][env->current_tc] = (int32_t)(HILO & 0xFFFFFFFF);
-    T0 = env->HI[0][env->current_tc] = (int32_t)(HILO >> 32);
+    env->LO[env->current_tc][0] = (int32_t)(HILO & 0xFFFFFFFF);
+    T0 = env->HI[env->current_tc][0] = (int32_t)(HILO >> 32);
 }
 
 static always_inline void set_HI_LOT0 (uint64_t HILO)
 {
-    T0 = env->LO[0][env->current_tc] = (int32_t)(HILO & 0xFFFFFFFF);
-    env->HI[0][env->current_tc] = (int32_t)(HILO >> 32);
+    T0 = env->LO[env->current_tc][0] = (int32_t)(HILO & 0xFFFFFFFF);
+    env->HI[env->current_tc][0] = (int32_t)(HILO >> 32);
 }
 
 void op_mult (void)
@@ -1029,13 +1023,13 @@ void op_mulshiu (void)
 #if defined(TARGET_MIPS64)
 void op_dmult (void)
 {
-    CALL_FROM_TB4(muls64, &(env->LO[0][env->current_tc]), &(env->HI[0][env->current_tc]), T0, T1);
+    CALL_FROM_TB4(muls64, &(env->LO[env->current_tc][0]), &(env->HI[env->current_tc][0]), T0, T1);
     FORCE_RET();
 }
 
 void op_dmultu (void)
 {
-    CALL_FROM_TB4(mulu64, &(env->LO[0][env->current_tc]), &(env->HI[0][env->current_tc]), T0, T1);
+    CALL_FROM_TB4(mulu64, &(env->LO[env->current_tc][0]), &(env->HI[env->current_tc][0]), T0, T1);
     FORCE_RET();
 }
 #endif
@@ -1044,14 +1038,14 @@ void op_dmultu (void)
 void op_movn (void)
 {
     if (T1 != 0)
-        env->gpr[PARAM1][env->current_tc] = T0;
+        env->gpr[env->current_tc][PARAM1] = T0;
     FORCE_RET();
 }
 
 void op_movz (void)
 {
     if (T1 == 0)
-        env->gpr[PARAM1][env->current_tc] = T0;
+        env->gpr[env->current_tc][PARAM1] = T0;
     FORCE_RET();
 }
 
@@ -1096,19 +1090,13 @@ OP_COND(ltz, (target_long)T0 < 0);
 /* Branch to register */
 void op_save_breg_target (void)
 {
-    env->btarget = T2;
-    FORCE_RET();
-}
-
-void op_restore_breg_target (void)
-{
-    T2 = env->btarget;
+    env->btarget = T1;
     FORCE_RET();
 }
 
 void op_breg (void)
 {
-    env->PC[env->current_tc] = T2;
+    env->PC[env->current_tc] = env->btarget;
     FORCE_RET();
 }
 
@@ -1129,25 +1117,13 @@ void op_save_btarget64 (void)
 /* Conditional branch */
 void op_set_bcond (void)
 {
-    T2 = T0;
-    FORCE_RET();
-}
-
-void op_save_bcond (void)
-{
-    env->bcond = T2;
-    FORCE_RET();
-}
-
-void op_restore_bcond (void)
-{
-    T2 = env->bcond;
+    env->bcond = T0;
     FORCE_RET();
 }
 
-void op_jnz_T2 (void)
+void op_jnz_bcond (void)
 {
-    if (T2)
+    if (env->bcond)
         GOTO_LABEL_PARAM(1);
     FORCE_RET();
 }
@@ -2300,7 +2276,7 @@ void op_mftgpr(void)
 {
     int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
 
-    T0 = env->gpr[PARAM1][other_tc];
+    T0 = env->gpr[other_tc][PARAM1];
     FORCE_RET();
 }
 
@@ -2308,7 +2284,7 @@ void op_mftlo(void)
 {
     int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
 
-    T0 = env->LO[PARAM1][other_tc];
+    T0 = env->LO[other_tc][PARAM1];
     FORCE_RET();
 }
 
@@ -2316,7 +2292,7 @@ void op_mfthi(void)
 {
     int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
 
-    T0 = env->HI[PARAM1][other_tc];
+    T0 = env->HI[other_tc][PARAM1];
     FORCE_RET();
 }
 
@@ -2324,7 +2300,7 @@ void op_mftacx(void)
 {
     int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
 
-    T0 = env->ACX[PARAM1][other_tc];
+    T0 = env->ACX[other_tc][PARAM1];
     FORCE_RET();
 }
 
@@ -2340,7 +2316,7 @@ void op_mttgpr(void)
 {
     int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
 
-    T0 = env->gpr[PARAM1][other_tc];
+    T0 = env->gpr[other_tc][PARAM1];
     FORCE_RET();
 }
 
@@ -2348,7 +2324,7 @@ void op_mttlo(void)
 {
     int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
 
-    T0 = env->LO[PARAM1][other_tc];
+    T0 = env->LO[other_tc][PARAM1];
     FORCE_RET();
 }
 
@@ -2356,7 +2332,7 @@ void op_mtthi(void)
 {
     int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
 
-    T0 = env->HI[PARAM1][other_tc];
+    T0 = env->HI[other_tc][PARAM1];
     FORCE_RET();
 }
 
@@ -2364,7 +2340,7 @@ void op_mttacx(void)
 {
     int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
 
-    T0 = env->ACX[PARAM1][other_tc];
+    T0 = env->ACX[other_tc][PARAM1];
     FORCE_RET();
 }
 
@@ -3116,12 +3092,6 @@ void op_debug (void)
     FORCE_RET();
 }
 
-void op_set_lladdr (void)
-{
-    env->CP0_LLAddr = T2;
-    FORCE_RET();
-}
-
 void debug_pre_eret (void);
 void debug_post_eret (void);
 void op_eret (void)
This page took 0.033889 seconds and 4 git commands to generate.