From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45546) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya2a0-0001ib-JB for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:39:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ya2Zx-00037Q-A3 for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:39:44 -0400 Received: from mail.uni-paderborn.de ([131.234.142.9]:60430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya2Zx-00036u-3S for qemu-devel@nongnu.org; Mon, 23 Mar 2015 09:39:41 -0400 Message-ID: <55102612.7040303@mail.uni-paderborn.de> Date: Mon, 23 Mar 2015 14:41:22 +0000 From: Bastian Koppelmann MIME-Version: 1.0 References: <1425739412-8144-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1425739412-8144-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] target-tricore: Fix two helper functions (clang warnings) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil , QEMU Developer Cc: Peter Maydell Hi Stefan, On 03/07/2015 02:43 PM, Stefan Weil wrote: > clang report: > > target-tricore/op_helper.c:1247:24: warning: > taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') > has no effect [-Wabsolute-value] > target-tricore/op_helper.c:1248:25: warning: > taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') > has no effect [-Wabsolute-value] > target-tricore/op_helper.c:1249:19: warning: > taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') > has no effect [-Wabsolute-value] > target-tricore/op_helper.c:1297:24: warning: > taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') > has no effect [-Wabsolute-value] > target-tricore/op_helper.c:1298:25: warning: > taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') > has no effect [-Wabsolute-value] > target-tricore/op_helper.c:1299:19: warning: > taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') > has no effect [-Wabsolute-value] > > Fix also the divisor which was taken from the wrong register > (thanks to Peter Maydell for this hint). > > Cc: Bastian Koppelmann > Signed-off-by: Stefan Weil > --- > [snip] The code for dvinit.b and dvinit.h is not correctly calculating the overflow bit, but I can't figure out why, since the documentation of the real hardware seems to be wrong. I will take your patch for now, so the warning is gone and try to come up with a proper fix as soon as possible. Cheers, Bastian