Skip to contentSkip to conversation

[5153] ppc: Convert GPR moves to TCG

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

lore
Share & tools
lore
#0 lore raw

Revision: 5153

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5153
Author:   aurel32
Date:     2008-09-04 05:25:47 +0000 (Thu, 04 Sep 2008)

Log Message:
-----------
ppc: Convert GPR moves to TCG

Replace op_load_gpr_{T0,T1,T2} and op_store_{T0,T1,T2} with tcg_gen_mov_tl. Introduce TCG variables cpu_gpr[0..31].

For the SPE extension, assure that ppc_gpr_t is only uint64_t for ppc64. Introduce TCG variables cpu_gprh[0..31] for upper 32 bits on ppc and helpers gen_{load,store}_gpr64. Based on suggestions by Aurelien, Thiemo and Blue.

Modified Paths:
--------------
trunk/target-ppc/cpu.h
trunk/target-ppc/op_template.h
trunk/target-ppc/translate.c

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

target-ppc/cpu.h +1 -11
@@ -33,17 +33,7 @@
 
 #else /* defined (TARGET_PPC64) */
 /* PowerPC 32 definitions */
-#if (HOST_LONG_BITS >= 64)
-/* When using 64 bits temporary registers,
- * we can use 64 bits GPR with no extra cost
- * It's even an optimization as this will prevent
- * the compiler to do unuseful masking in the micro-ops.
- */
-typedef uint64_t ppc_gpr_t;
-#else /* (HOST_LONG_BITS >= 64) */
 typedef uint32_t ppc_gpr_t;
-#endif /* (HOST_LONG_BITS >= 64) */
-
 #define TARGET_LONG_BITS 32
 
 #if defined(TARGET_PPCEMB)
@@ -541,7 +531,7 @@
     /* First are the most commonly used resources
      * during translated code execution
      */
-#if (HOST_LONG_BITS == 32)
+#if (TARGET_LONG_BITS > HOST_LONG_BITS) || !defined(TARGET_PPC64)
     /* temporary fixed-point registers
      * used to emulate 64 bits registers on 32 bits hosts
      */

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

target-ppc/op_template.h +0 -85

91 lines not on this page · raw message

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

target-ppc/translate.c +389 -358

1,955 lines not on this page · raw message