Commit 0cbcd90636872c0d56a44d3e1040080660894eec
1 parent
8026037b
Add GEN_VXRFORM{,1} macros 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@6235 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
21 additions
and
0 deletions
target-ppc/translate.c
| ... | ... | @@ -6359,6 +6359,27 @@ GEN_VXFORM(vsum4shs, 4, 25); |
| 6359 | 6359 | GEN_VXFORM(vsum2sws, 4, 26); |
| 6360 | 6360 | GEN_VXFORM(vsumsws, 4, 30); |
| 6361 | 6361 | |
| 6362 | +#define GEN_VXRFORM1(opname, name, str, opc2, opc3) \ | |
| 6363 | + GEN_HANDLER2(name, str, 0x4, opc2, opc3, 0x00000000, PPC_ALTIVEC) \ | |
| 6364 | + { \ | |
| 6365 | + TCGv_ptr ra, rb, rd; \ | |
| 6366 | + if (unlikely(!ctx->altivec_enabled)) { \ | |
| 6367 | + gen_exception(ctx, POWERPC_EXCP_VPU); \ | |
| 6368 | + return; \ | |
| 6369 | + } \ | |
| 6370 | + ra = gen_avr_ptr(rA(ctx->opcode)); \ | |
| 6371 | + rb = gen_avr_ptr(rB(ctx->opcode)); \ | |
| 6372 | + rd = gen_avr_ptr(rD(ctx->opcode)); \ | |
| 6373 | + gen_helper_##opname (rd, ra, rb); \ | |
| 6374 | + tcg_temp_free_ptr(ra); \ | |
| 6375 | + tcg_temp_free_ptr(rb); \ | |
| 6376 | + tcg_temp_free_ptr(rd); \ | |
| 6377 | + } | |
| 6378 | + | |
| 6379 | +#define GEN_VXRFORM(name, opc2, opc3) \ | |
| 6380 | + GEN_VXRFORM1(name, name, #name, opc2, opc3) \ | |
| 6381 | + GEN_VXRFORM1(name##_dot, name##_, #name ".", opc2, (opc3 | (0x1 << 4))) | |
| 6382 | + | |
| 6362 | 6383 | #define GEN_VXFORM_NOA(name, opc2, opc3) \ |
| 6363 | 6384 | GEN_HANDLER(name, 0x04, opc2, opc3, 0x001f0000, PPC_ALTIVEC) \ |
| 6364 | 6385 | { \ | ... | ... |