From 805e800d043bc07719e6308bc07ea22d871d4961 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 27 Feb 2012 12:36:21 +0000 Subject: [PATCH] * config/tc-crx.c (check_range): Correct uint32_t misconceptions. --- gas/ChangeLog | 4 ++++ gas/config/tc-crx.c | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 47dede44c29..be8e7c52b96 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2012-02-27 Alan Modra + + * config/tc-crx.c (check_range): Correct uint32_t misconceptions. + 2012-02-27 Alan Modra * config/tc-tic4x.c (tic4x_do_align): Remove ATTRIBUTE_UNUSED on diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c index 775781bf3f7..3b06a788f4a 100644 --- a/gas/config/tc-crx.c +++ b/gas/config/tc-crx.c @@ -1331,9 +1331,6 @@ check_range (long *num, int bits, int unsigned flags, int update) uint32_t upper_64kb = 0xffff0000; uint32_t value = *num; - /* Trim all values to 32 bits. uint32_t can be more than 32 bits. */ - value &= 0xffffffff; - /* Verify operand value is even. */ if (flags & OP_EVEN) { @@ -1361,7 +1358,7 @@ check_range (long *num, int bits, int unsigned flags, int update) value is implementation defined. See ISO C 6.5.7. So we use an unsigned type and sign extend afterwards. */ value >>= 1; - value = ((value ^ 0x40000000) - 0x40000000) & 0xffffffff; + value = (value ^ 0x40000000) - 0x40000000; if (update) *num = value; } @@ -1407,7 +1404,7 @@ check_range (long *num, int bits, int unsigned flags, int update) for (bin = 0; bin < cst4_maps; bin++) { - if (value == ((uint32_t) cst4_map[bin] & 0xffffffff)) + if (value == (uint32_t) cst4_map[bin]) { is_cst4 = 1; if (update) -- 2.30.2