Commit 707cec33f0c978a9c56504e6d1a90ce1770ccaa7
1 parent
6cf1c6e5
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
Showing
1 changed file
with
23 additions
and
0 deletions
target-ppc/translate.c
... | ... | @@ -6353,6 +6353,29 @@ GEN_HANDLER(vsldoi, 0x04, 0x16, 0xFF, 0x00000400, PPC_ALTIVEC) |
6353 | 6353 | tcg_temp_free(sh); |
6354 | 6354 | } |
6355 | 6355 | |
6356 | +#define GEN_VAFORM_PAIRED(name0, name1, opc2) \ | |
6357 | + GEN_HANDLER(name0##_##name1, 0x04, opc2, 0xFF, 0x00000000, PPC_ALTIVEC) \ | |
6358 | + { \ | |
6359 | + TCGv_ptr ra, rb, rc, rd; \ | |
6360 | + if (unlikely(!ctx->altivec_enabled)) { \ | |
6361 | + gen_exception(ctx, POWERPC_EXCP_VPU); \ | |
6362 | + return; \ | |
6363 | + } \ | |
6364 | + ra = gen_avr_ptr(rA(ctx->opcode)); \ | |
6365 | + rb = gen_avr_ptr(rB(ctx->opcode)); \ | |
6366 | + rc = gen_avr_ptr(rC(ctx->opcode)); \ | |
6367 | + rd = gen_avr_ptr(rD(ctx->opcode)); \ | |
6368 | + if (Rc(ctx->opcode)) { \ | |
6369 | + gen_helper_##name1 (rd, ra, rb, rc); \ | |
6370 | + } else { \ | |
6371 | + gen_helper_##name0 (rd, ra, rb, rc); \ | |
6372 | + } \ | |
6373 | + tcg_temp_free_ptr(ra); \ | |
6374 | + tcg_temp_free_ptr(rb); \ | |
6375 | + tcg_temp_free_ptr(rc); \ | |
6376 | + tcg_temp_free_ptr(rd); \ | |
6377 | + } | |
6378 | + | |
6356 | 6379 | /*** SPE extension ***/ |
6357 | 6380 | /* Register moves */ |
6358 | 6381 | ... | ... |