From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYuge-0004YL-5S for qemu-devel@nongnu.org; Thu, 25 Feb 2016 07:06:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYuga-0008BS-TB for qemu-devel@nongnu.org; Thu, 25 Feb 2016 07:06:28 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:48295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYuga-0008Aj-N9 for qemu-devel@nongnu.org; Thu, 25 Feb 2016 07:06:24 -0500 From: Bastian Koppelmann Date: Thu, 25 Feb 2016 13:06:09 +0100 Message-Id: <1456401973-29673-3-git-send-email-kbastian@mail.uni-paderborn.de> In-Reply-To: <1456401973-29673-1-git-send-email-kbastian@mail.uni-paderborn.de> References: <1456401973-29673-1-git-send-email-kbastian@mail.uni-paderborn.de> Subject: [Qemu-devel] [PULL 2/6] target-tricore: Fix wrong precedences on psw_write List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Wrong braces on the restore of the cached TCGv SV and V bit could lead to a wrong PSW. While at this it removes unnecessary braces for the restore of the cached TCGv AV and SAV bits. Signed-off-by: Bastian Koppelmann --- target-tricore/helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target-tricore/helper.c b/target-tricore/helper.c index a8fd418..7d96dad 100644 --- a/target-tricore/helper.c +++ b/target-tricore/helper.c @@ -127,9 +127,9 @@ uint32_t psw_read(CPUTriCoreState *env) void psw_write(CPUTriCoreState *env, uint32_t val) { env->PSW_USB_C = (val & MASK_USB_C); - env->PSW_USB_V = (val & MASK_USB_V << 1); - env->PSW_USB_SV = (val & MASK_USB_SV << 2); - env->PSW_USB_AV = ((val & MASK_USB_AV) << 3); - env->PSW_USB_SAV = ((val & MASK_USB_SAV) << 4); + env->PSW_USB_V = (val & MASK_USB_V) << 1; + env->PSW_USB_SV = (val & MASK_USB_SV) << 2; + env->PSW_USB_AV = (val & MASK_USB_AV) << 3; + env->PSW_USB_SAV = (val & MASK_USB_SAV) << 4; env->PSW = val; } -- 2.7.1