diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-04 22:10:09 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-04 22:10:09 +0000 |
commit | cd633b10fd99faeb01c94ba35ec35f48f4e86a68 (patch) | |
tree | 85086901caffc7c10bea78dbf4363fae756386fb /target-ppc/translate.c | |
parent | 5e1d0985f9cb5146f7feaa8a6aa223566ef0592a (diff) | |
download | hqemu-cd633b10fd99faeb01c94ba35ec35f48f4e86a68.zip hqemu-cd633b10fd99faeb01c94ba35ec35f48f4e86a68.tar.gz |
Add vsldoi instruction.
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@6171 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r-- | target-ppc/translate.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 93c4177..745da78 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -374,6 +374,8 @@ EXTRACT_HELPER(UIMM, 0, 16); EXTRACT_HELPER(NB, 11, 5); /* Shift count */ EXTRACT_HELPER(SH, 11, 5); +/* Vector shift count */ +EXTRACT_HELPER(VSH, 6, 4); /* Mask start */ EXTRACT_HELPER(MB, 6, 5); /* Mask end */ @@ -6268,6 +6270,25 @@ GEN_VXFORM(vrlb, 2, 0); GEN_VXFORM(vrlh, 2, 1); GEN_VXFORM(vrlw, 2, 2); +GEN_HANDLER(vsldoi, 0x04, 0x16, 0xFF, 0x00000400, PPC_ALTIVEC) +{ + TCGv_ptr ra, rb, rd; + TCGv sh; + 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)); + rd = gen_avr_ptr(rD(ctx->opcode)); + sh = tcg_const_i32(VSH(ctx->opcode)); + gen_helper_vsldoi (rd, ra, rb, sh); + tcg_temp_free_ptr(ra); + tcg_temp_free_ptr(rb); + tcg_temp_free_ptr(rd); + tcg_temp_free(sh); +} + /*** SPE extension ***/ /* Register moves */ |