]> Git Repo - qemu.git/commitdiff
target-ppc: fix SPE evsplat* instructions
authorNathan Froyd <[email protected]>
Tue, 23 Feb 2010 20:21:31 +0000 (12:21 -0800)
committerAurelien Jarno <[email protected]>
Sat, 27 Feb 2010 15:10:50 +0000 (16:10 +0100)
The shifts in the gen_evsplat* functions were expecting rA to be masked,
not extracted, and so used the wrong shift amounts to sign-extend or pad
with zeroes.

Signed-off-by: Nathan Froyd <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
target-ppc/translate.c

index d4e81ce89ba608cfba5870f794b1e2d65a7c65e7..0b11fda880ddb3673e04ca2c2106df25b667fb72 100644 (file)
@@ -7001,7 +7001,7 @@ static inline void gen_evmergelohi(DisasContext *ctx)
 }
 static inline void gen_evsplati(DisasContext *ctx)
 {
-    uint64_t imm = ((int32_t)(rA(ctx->opcode) << 11)) >> 27;
+    uint64_t imm = ((int32_t)(rA(ctx->opcode) << 27)) >> 27;
 
 #if defined(TARGET_PPC64)
     tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], (imm << 32) | imm);
@@ -7012,7 +7012,7 @@ static inline void gen_evsplati(DisasContext *ctx)
 }
 static inline void gen_evsplatfi(DisasContext *ctx)
 {
-    uint64_t imm = rA(ctx->opcode) << 11;
+    uint64_t imm = rA(ctx->opcode) << 27;
 
 #if defined(TARGET_PPC64)
     tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], (imm << 32) | imm);
This page took 0.042886 seconds and 4 git commands to generate.