From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LC2zz-0002kA-8N for qemu-devel@nongnu.org; Sun, 14 Dec 2008 21:15:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LC2zy-0002jb-JZ for qemu-devel@nongnu.org; Sun, 14 Dec 2008 21:15:54 -0500 Received: from [199.232.76.173] (port=40907 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LC2zy-0002jS-7W for qemu-devel@nongnu.org; Sun, 14 Dec 2008 21:15:54 -0500 Received: from mx20.gnu.org ([199.232.41.8]:31139) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LC2zy-0000f5-0E for qemu-devel@nongnu.org; Sun, 14 Dec 2008 21:15:54 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LC2zx-0002F2-7a for qemu-devel@nongnu.org; Sun, 14 Dec 2008 21:15:53 -0500 From: Nathan Froyd Date: Sun, 14 Dec 2008 18:15:04 -0800 Message-Id: <1229307315-16807-32-git-send-email-froydnj@codesourcery.com> In-Reply-To: <1229307315-16807-1-git-send-email-froydnj@codesourcery.com> References: <1229307315-16807-1-git-send-email-froydnj@codesourcery.com> Subject: [Qemu-devel] [PATCH 31/42] target-ppc: add GEN_VAFORM_PAIRED macro 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 Signed-off-by: Nathan Froyd --- target-ppc/translate.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 0ed504b..d77ddaf 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -6419,6 +6419,29 @@ GEN_HANDLER(vsldoi, 0x04, 0x16, 0xFF, 0x00000400, PPC_ALTIVEC) tcg_temp_free(sh); } +#define GEN_VAFORM_PAIRED(name0, name1, xo) \ + GEN_HANDLER(name0##_##name1, 0x04, xo>>1, 0xFF, 0x00000000, PPC_ALTIVEC) \ + { \ + TCGv_ptr ra, rb, rc, 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)); \ + rc = gen_avr_ptr(rC(ctx->opcode)); \ + rd = gen_avr_ptr(rD(ctx->opcode)); \ + if (Rc(ctx->opcode)) { \ + gen_helper_##name1 (rd, ra, rb, rc); \ + } else { \ + gen_helper_##name0 (rd, ra, rb, rc); \ + } \ + tcg_temp_free (ra); \ + tcg_temp_free (rb); \ + tcg_temp_free (rc); \ + tcg_temp_free (rd); \ + } + /*** SPE extension ***/ /* Register moves */ -- 1.6.0.5