Skip to contentSkip to conversation

[5591] target-ppc: convert 405 MAC instructions to TCG

Qemu-devel Aurelien Jarno 1 participant 1 message Nov 1, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5591

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5591
Author:   aurel32
Date:     2008-11-01 00:54:23 +0000 (Sat, 01 Nov 2008)

Log Message:
-----------
target-ppc: convert 405 MAC instructions to TCG

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

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

target-ppc/op.c +0 -95
@@ -326,34 +326,6 @@
     RETURN();
 }
 
-/***                           Integer arithmetic                          ***/
-/* add */
-void OPPROTO op_check_addo (void)
-{
-    int ov = (((uint32_t)T2 ^ (uint32_t)T1 ^ UINT32_MAX) &
-              ((uint32_t)T2 ^ (uint32_t)T0)) >> 31;
-    if (ov) {
-        env->xer |= (1 << XER_OV) | (1 << XER_SO);
-    } else {
-        env->xer &= ~(1 << XER_OV);
-    }
-    RETURN();
-}
-
-#if defined(TARGET_PPC64)
-void OPPROTO op_check_addo_64 (void)
-{
-    int ov = (((uint64_t)T2 ^ (uint64_t)T1 ^ UINT64_MAX) &
-              ((uint64_t)T2 ^ (uint64_t)T0)) >> 63;
-    if (ov) {
-        env->xer |= (1 << XER_OV) | (1 << XER_SO);
-    } else {
-        env->xer &= ~(1 << XER_OV);
-    }
-    RETURN();
-}
-#endif
-
 /***                             Integer shift                             ***/
 void OPPROTO op_srli_T1 (void)
 {
@@ -1062,73 +1034,6 @@
 #endif
 
 /* PowerPC 4xx specific micro-ops */
-void OPPROTO op_405_add_T0_T2 (void)
-{
-    T0 = (int32_t)T0 + (int32_t)T2;
-    RETURN();
-}
-
-void OPPROTO op_405_mulchw (void)
-{
-    T0 = ((int16_t)T0) * ((int16_t)(T1 >> 16));
-    RETURN();
-}
-
-void OPPROTO op_405_mulchwu (void)
-{
-    T0 = ((uint16_t)T0) * ((uint16_t)(T1 >> 16));
-    RETURN();
-}
-
-void OPPROTO op_405_mulhhw (void)
-{
-    T0 = ((int16_t)(T0 >> 16)) * ((int16_t)(T1 >> 16));
-    RETURN();
-}
-
-void OPPROTO op_405_mulhhwu (void)
-{
-    T0 = ((uint16_t)(T0 >> 16)) * ((uint16_t)(T1 >> 16));
-    RETURN();
-}
-
-void OPPROTO op_405_mullhw (void)
-{
-    T0 = ((int16_t)T0) * ((int16_t)T1);
-    RETURN();
-}
-
-void OPPROTO op_405_mullhwu (void)
-{
-    T0 = ((uint16_t)T0) * ((uint16_t)T1);
-    RETURN();
-}
-
-void OPPROTO op_405_check_sat (void)
-{
-    do_405_check_sat();
-    RETURN();
-}
-
-void OPPROTO op_405_check_ovu (void)
-{
-    if (likely(T0 >= T2)) {
-        env->xer &= ~(1 << XER_OV);
-    } else {
-        env->xer |= (1 << XER_OV) | (1 << XER_SO);
-    }
-    RETURN();
-}
-
-void OPPROTO op_405_check_satu (void)
-{
-    if (unlikely(T0 < T2)) {
-        /* Saturate result */
-        T0 = UINT32_MAX;
-    }
-    RETURN();
-}
-
 void OPPROTO op_load_dcr (void)
 {
     do_load_dcr();

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

target-ppc/op_helper.c +0 -12
@@ -1510,18 +1510,6 @@
 
 /*****************************************************************************/
 /* Embedded PowerPC specific helpers */
-void do_405_check_sat (void)
-{
-    if (!likely((((uint32_t)T1 ^ (uint32_t)T2) >> 31) ||
-                !(((uint32_t)T0 ^ (uint32_t)T2) >> 31))) {
-        /* Saturate result */
-        if (T2 >> 31) {
-            T0 = INT32_MIN;
-        } else {
-            T0 = INT32_MAX;
-        }
-    }
-}
 
 /* XXX: to be improved to check access rights when in user-mode */
 void do_load_dcr (void)

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

target-ppc/op_helper.h +0 -1
@@ -144,7 +144,6 @@
 #endif
 
 /* PowerPC 4xx specific helpers */
-void do_405_check_sat (void);
 void do_load_dcr (void);
 void do_store_dcr (void);
 #if !defined(CONFIG_USER_ONLY)

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

target-ppc/translate.c +72 -32

149 lines not on this page · raw message