Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nk0qm-0006Yg-0U for qemu-devel@nongnu.org; Tue, 23 Feb 2010 14:55:20 -0500 Received: from [199.232.76.173] (port=56158 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nk0qk-0006YW-Lv for qemu-devel@nongnu.org; Tue, 23 Feb 2010 14:55:18 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nk0qj-0000fb-NS for qemu-devel@nongnu.org; Tue, 23 Feb 2010 14:55:18 -0500 Received: from mx20.gnu.org ([199.232.41.8]:52582) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nk0qj-0000fA-9u for qemu-devel@nongnu.org; Tue, 23 Feb 2010 14:55:17 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nk0qh-0008Al-Hl for qemu-devel@nongnu.org; Tue, 23 Feb 2010 14:55:15 -0500 From: Nathan Froyd Date: Tue, 23 Feb 2010 11:55:14 -0800 Message-Id: <1266954914-29595-1-git-send-email-froydnj@codesourcery.com> Subject: [Qemu-devel] [PATCH] target-ppc: fix SPE evcmp* instructions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net 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 --- target-ppc/cpu.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index d15bba1..63aeb86 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -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 -- 1.6.3.2