qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 9/x] ppc: Convert op_add, op_addi to TCG


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 9/x] ppc: Convert op_add, op_addi to TCG
Date: Fri, 5 Sep 2008 19:17:10 +0200


Am 05.09.2008 um 16:18 schrieb Aurélien Jarno:

--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -827,10 +827,14 @@ __GEN_INT_ARITH1_O_64(name##o, opc1, opc2, opc3 |
0x10, type)
#endif

/* add    add.    addo    addo.    */
+static always_inline void gen_op_add (void)
+{
+    tcg_gen_add_tl(cpu_T[0], cpu_T[0], cpu_T[1]);
+}

At some point, we will have to change this kind of function, otherwise
it will be really difficult to get rid of T0, T1 and T2.

Right, same for subf. But for now, a function of this name is still required here for the add instruction due to the GEN_INT_ARITH2 (or similar) macro slightly below, which appears to set up these functions as handlers for the family of instruction opcodes iiuc. To change those macros, the whole family (or even more instructions) will need to be converted first.

For me, the use of global TCG variables should permit it to run on Mac OS X Leopard with GCC 4.0.1 at some point, so even if it doesn't allow optimizations right away, it has some mid-term benefits. For the other occurrences of gen_op_add I already inlined it for future optimizations but didn't spot opportunities to do that yet.

I will be mostly offline starting this weekend but would likely continue working on ppc. If anyone else plans to work on it, it would be nice to coordinate that in advance to avoid conflicting patches.

Andreas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]