From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYMgz-0007Fj-Ru for qemu-devel@nongnu.org; Wed, 18 Mar 2015 18:44:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYMgt-0004Lp-NB for qemu-devel@nongnu.org; Wed, 18 Mar 2015 18:44:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYMgt-0004Ld-FE for qemu-devel@nongnu.org; Wed, 18 Mar 2015 18:43:55 -0400 From: John Snow Date: Wed, 18 Mar 2015 18:43:42 -0400 Message-Id: <1426718625-24120-2-git-send-email-jsnow@redhat.com> In-Reply-To: <1426718625-24120-1-git-send-email-jsnow@redhat.com> References: <1426718625-24120-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH v2 1/4] tricore: remove no-op abs() calls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, John Snow , stefanha@redhat.com, kbastian@mail.uni-paderborn.de Calling abs() on a uint32_t is a no-op, so remove it. clang 3.5.0 will not compile this if -Werror is set, throwing a -Wabsolute-value warning. Signed-off-by: John Snow --- target-tricore/op_helper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c index 97b0c8b..5b82223 100644 --- a/target-tricore/op_helper.c +++ b/target-tricore/op_helper.c @@ -1953,9 +1953,9 @@ uint64_t helper_dvinit_b_13(CPUTriCoreState *env, uint32_t r1, uint32_t r2) quotient_sign = 1; } - abs_sig_dividend = abs(r1) >> 7; - abs_base_dividend = abs(r1) & 0x7f; - abs_divisor = abs(r1); + abs_sig_dividend = r1 >> 7; + abs_base_dividend = r1 & 0x7f; + abs_divisor = r1; /* calc overflow */ env->PSW_USB_V = 0; if ((quotient_sign) && (abs_divisor)) { @@ -2003,9 +2003,9 @@ uint64_t helper_dvinit_h_13(CPUTriCoreState *env, uint32_t r1, uint32_t r2) quotient_sign = 1; } - abs_sig_dividend = abs(r1) >> 7; - abs_base_dividend = abs(r1) & 0x7f; - abs_divisor = abs(r1); + abs_sig_dividend = r1 >> 7; + abs_base_dividend = r1 & 0x7f; + abs_divisor = r1; /* calc overflow */ env->PSW_USB_V = 0; if ((quotient_sign) && (abs_divisor)) { -- 2.1.0