From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LL01Y-0005Gh-IA for qemu-devel@nongnu.org; Thu, 08 Jan 2009 13:54:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LL01X-0005GR-8u for qemu-devel@nongnu.org; Thu, 08 Jan 2009 13:54:31 -0500 Received: from [199.232.76.173] (port=56720 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LL01X-0005GM-4N for qemu-devel@nongnu.org; Thu, 08 Jan 2009 13:54:31 -0500 Received: from savannah.gnu.org ([199.232.41.3]:45492 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LL01W-0007oS-Pl for qemu-devel@nongnu.org; Thu, 08 Jan 2009 13:54:30 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LL01V-0004Xb-On for qemu-devel@nongnu.org; Thu, 08 Jan 2009 18:54:30 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LL01U-0004XT-83 for qemu-devel@nongnu.org; Thu, 08 Jan 2009 18:54:29 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Thu, 08 Jan 2009 18:54:28 +0000 Subject: [Qemu-devel] [6235] Add GEN_VXRFORM{, 1} macros for subsequent instructions Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6235 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6235 Author: aurel32 Date: 2009-01-08 18:54:26 +0000 (Thu, 08 Jan 2009) Log Message: ----------- Add GEN_VXRFORM{,1} macros for subsequent instructions Signed-off-by: Nathan Froyd Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-ppc/translate.c Modified: trunk/target-ppc/translate.c =================================================================== --- trunk/target-ppc/translate.c 2009-01-08 18:52:52 UTC (rev 6234) +++ trunk/target-ppc/translate.c 2009-01-08 18:54:26 UTC (rev 6235) @@ -6359,6 +6359,27 @@ GEN_VXFORM(vsum2sws, 4, 26); GEN_VXFORM(vsumsws, 4, 30); +#define GEN_VXRFORM1(opname, name, str, opc2, opc3) \ + GEN_HANDLER2(name, str, 0x4, opc2, opc3, 0x00000000, PPC_ALTIVEC) \ + { \ + TCGv_ptr ra, rb, rd; \ + if (unlikely(!ctx->altivec_enabled)) { \ + gen_exception(ctx, POWERPC_EXCP_VPU); \ + return; \ + } \ + ra = gen_avr_ptr(rA(ctx->opcode)); \ + rb = gen_avr_ptr(rB(ctx->opcode)); \ + rd = gen_avr_ptr(rD(ctx->opcode)); \ + gen_helper_##opname (rd, ra, rb); \ + tcg_temp_free_ptr(ra); \ + tcg_temp_free_ptr(rb); \ + tcg_temp_free_ptr(rd); \ + } + +#define GEN_VXRFORM(name, opc2, opc3) \ + GEN_VXRFORM1(name, name, #name, opc2, opc3) \ + GEN_VXRFORM1(name##_dot, name##_, #name ".", opc2, (opc3 | (0x1 << 4))) + #define GEN_VXFORM_NOA(name, opc2, opc3) \ GEN_HANDLER(name, 0x04, opc2, opc3, 0x001f0000, PPC_ALTIVEC) \ { \