]> Git Repo - qemu.git/commitdiff
target-ppc: fix SPE evcmp* instructions
authorNathan Froyd <[email protected]>
Tue, 23 Feb 2010 19:55:14 +0000 (11:55 -0800)
committerAurelien Jarno <[email protected]>
Sat, 27 Feb 2010 15:10:49 +0000 (16:10 +0100)
The CRF_{CH,CL,CH_OR_CL,CH_AND_CL} constants were all off by one bit
position.  Because of this, the SPE evcmp* family of instructions would
store values in the result condition register that were also off by one
bit position.

Fixed by using the CRF_{LT,GT,EQ,SO} constants for the shift amounts.

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

index d15bba18d460218f51c26e0ae91b39310a5294b6..63aeb86070d5c5a5b28b36f933724751c0d03a79 100644 (file)
@@ -834,10 +834,10 @@ static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
 #define CRF_GT        2
 #define CRF_EQ        1
 #define CRF_SO        0
-#define CRF_CH        (1 << 4)
-#define CRF_CL        (1 << 3)
-#define CRF_CH_OR_CL  (1 << 2)
-#define CRF_CH_AND_CL (1 << 1)
+#define CRF_CH        (1 << CRF_LT)
+#define CRF_CL        (1 << CRF_GT)
+#define CRF_CH_OR_CL  (1 << CRF_EQ)
+#define CRF_CH_AND_CL (1 << CRF_SO)
 
 /* XER definitions */
 #define XER_SO  31
This page took 0.030219 seconds and 4 git commands to generate.