diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-08 18:54:57 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-08 18:54:57 +0000 |
commit | c026766b15a9324baeb2068e3b07658aae0b177b (patch) | |
tree | 4abe2b2a6c053af01dcf923446b47fd63c1dcabb /target-ppc/translate.c | |
parent | d9430add633c0d43ecc5532520ca04c6e11b7a4e (diff) | |
download | qemu-c026766b15a9324baeb2068e3b07658aae0b177b.zip qemu-c026766b15a9324baeb2068e3b07658aae0b177b.tar.gz qemu-c026766b15a9324baeb2068e3b07658aae0b177b.tar.bz2 |
Add vspltis{b,h,w} 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@6238 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r-- | target-ppc/translate.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 0cd922d..20d3471 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -6392,6 +6392,26 @@ GEN_VXRFORM(vcmpgtub, 3, 8) GEN_VXRFORM(vcmpgtuh, 3, 9) GEN_VXRFORM(vcmpgtuw, 3, 10) +#define GEN_VXFORM_SIMM(name, opc2, opc3) \ + GEN_HANDLER(name, 0x04, opc2, opc3, 0x00000000, PPC_ALTIVEC) \ + { \ + TCGv_ptr rd; \ + TCGv_i32 simm; \ + if (unlikely(!ctx->altivec_enabled)) { \ + gen_exception(ctx, POWERPC_EXCP_VPU); \ + return; \ + } \ + simm = tcg_const_i32(SIMM5(ctx->opcode)); \ + rd = gen_avr_ptr(rD(ctx->opcode)); \ + gen_helper_##name (rd, simm); \ + tcg_temp_free_i32(simm); \ + tcg_temp_free_ptr(rd); \ + } + +GEN_VXFORM_SIMM(vspltisb, 6, 12); +GEN_VXFORM_SIMM(vspltish, 6, 13); +GEN_VXFORM_SIMM(vspltisw, 6, 14); + #define GEN_VXFORM_NOA(name, opc2, opc3) \ GEN_HANDLER(name, 0x04, opc2, opc3, 0x001f0000, PPC_ALTIVEC) \ { \ |