[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/4] tricore: remove no-op abs() calls
From: |
John Snow |
Subject: |
[Qemu-devel] [PATCH v2 1/4] tricore: remove no-op abs() calls |
Date: |
Wed, 18 Mar 2015 18:43:42 -0400 |
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 <address@hidden>
---
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