Skip to contentSkip to conversation

[5235] target-alpha: convert arith2 instructions to TCG

Qemu-devel Aurelien Jarno 1 participant 1 message Sep 16, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5235

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5235
Author:   aurel32
Date:     2008-09-16 22:44:02 +0000 (Tue, 16 Sep 2008)

Log Message:
-----------
target-alpha: convert arith2 instructions to TCG

Replace gen_arith2 generic macro and dyngon ops by instruction specific optimized TCG code.

Modified Paths:
--------------
trunk/target-alpha/helper.h
trunk/target-alpha/op.c
trunk/target-alpha/op_helper.c
trunk/target-alpha/op_helper.h
trunk/target-alpha/translate.c

Modified: trunk/target-alpha/helper.h
===================================================================

target-alpha/helper.h +6 -0
@@ -3,3 +3,9 @@
 #endif
 
 DEF_HELPER(void, helper_tb_flush, (void))
+
+DEF_HELPER(uint64_t, helper_amask, (uint64_t))
+
+DEF_HELPER(uint64_t, helper_ctpop, (uint64_t))
+DEF_HELPER(uint64_t, helper_ctlz, (uint64_t))
+DEF_HELPER(uint64_t, helper_cttz, (uint64_t))

Modified: trunk/target-alpha/op.c
===================================================================

target-alpha/op.c +0 -37
@@ -155,12 +155,6 @@
     RETURN();
 }
 
-void OPPROTO op_load_amask (void)
-{
-    helper_amask();
-    RETURN();
-}
-
 void OPPROTO op_load_pcc (void)
 {
     helper_load_pcc();
@@ -340,37 +334,6 @@
     RETURN();
 }
 
-void OPPROTO op_sextb (void)
-{
-    T0 = (int64_t)((int8_t)T0);
-    RETURN();
-}
-
-void OPPROTO op_sextw (void)
-{
-    T0 = (int64_t)((int16_t)T0);
-    RETURN();
-
-}
-
-void OPPROTO op_ctpop (void)
-{
-    helper_ctpop();
-    RETURN();
-}
-
-void OPPROTO op_ctlz (void)
-{
-    helper_ctlz();
-    RETURN();
-}
-
-void OPPROTO op_cttz (void)
-{
-    helper_cttz();
-    RETURN();
-}
-
 void OPPROTO op_mskbl (void)
 {
     helper_mskbl();

Modified: trunk/target-alpha/op_helper.c
===================================================================

target-alpha/op_helper.c +9 -8
@@ -65,7 +65,7 @@
     cpu_loop_exit();
 }
 
-void helper_amask (void)
+uint64_t helper_amask (uint64_t arg)
 {
     switch (env->implver) {
     case IMPLVER_2106x:
@@ -74,9 +74,10 @@
     case IMPLVER_21164:
     case IMPLVER_21264:
     case IMPLVER_21364:
-        T0 &= ~env->amask;
+        arg &= ~env->amask;
         break;
     }
+    return arg;
 }
 
 void helper_load_pcc (void)
@@ -210,19 +211,19 @@
     T0 = tl;
 }
 
-void helper_ctpop (void)
+uint64_t helper_ctpop (uint64_t arg)
 {
-    T0 = ctpop64(T0);
+    return ctpop64(arg);
 }
 
-void helper_ctlz (void)
+uint64_t helper_ctlz (uint64_t arg)
 {
-    T0 = clz64(T0);
+    return clz64(arg);
 }
 
-void helper_cttz (void)
+uint64_t helper_cttz (uint64_t arg)
 {
-    T0 = ctz64(T0);
+    return ctz64(arg);
 }
 
 static always_inline uint64_t byte_zap (uint64_t op, uint8_t mskb)

Modified: trunk/target-alpha/op_helper.h
===================================================================

target-alpha/op_helper.h +0 -4
@@ -20,7 +20,6 @@
 
 void helper_call_pal (uint32_t palcode);
 void helper_excp (uint32_t excp, uint32_t error);
-void helper_amask (void);
 void helper_load_pcc (void);
 void helper_load_implver (void);
 void helper_load_fpcr (void);
@@ -34,9 +33,6 @@
 void helper_sublv (void);
 void helper_mullv (void);
 void helper_mulqv (void);
-void helper_ctpop (void);
-void helper_ctlz (void);
-void helper_cttz (void);
 void helper_mskbl (void);
 void helper_extbl (void);
 void helper_insbl (void);

Modified: trunk/target-alpha/translate.c
===================================================================

target-alpha/translate.c +49 -27

127 lines not on this page · raw message