diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-04 22:11:29 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-04 22:11:29 +0000 |
commit | 707cec33f0c978a9c56504e6d1a90ce1770ccaa7 (patch) | |
tree | 747a8c7740068cba41a96d7b0293f7dac619b940 /target-ppc | |
parent | 6cf1c6e5470aa68afdc1185fe289072cb06e8cf7 (diff) |
Add GEN_VAFORM_PAIRED macro for subsequent instructions.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6178 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc')
-rw-r--r-- | 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 0192c408f3..b9d65f2df8 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -6353,6 +6353,29 @@ GEN_HANDLER(vsldoi, 0x04, 0x16, 0xFF, 0x00000400, PPC_ALTIVEC) tcg_temp_free(sh); } +#define GEN_VAFORM_PAIRED(name0, name1, opc2) \ + GEN_HANDLER(name0##_##name1, 0x04, opc2, 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_ptr(ra); \ + tcg_temp_free_ptr(rb); \ + tcg_temp_free_ptr(rc); \ + tcg_temp_free_ptr(rd); \ + } + /*** SPE extension ***/ /* Register moves */ |