diff options
author | Alan Modra <amodra@gmail.com> | 2015-07-21 12:10:27 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2015-07-22 10:29:12 +0930 |
commit | f945ba50bb7e11c03d850d1680b15da758300ad7 (patch) | |
tree | 5aafc6def8745816294e695277656c89e75d1e87 /gold | |
parent | 6dca8d51d523adc1a8ba7ea22c4b27d86a57da56 (diff) | |
download | gdb-f945ba50bb7e11c03d850d1680b15da758300ad7.zip gdb-f945ba50bb7e11c03d850d1680b15da758300ad7.tar.gz gdb-f945ba50bb7e11c03d850d1680b15da758300ad7.tar.bz2 |
GOLD aarch64 warning fix
aarch64.cc:2026:50: error: integer overflow in expression [-Werror=overflow]
Insntype adr_insn = adrp_insn & ((1 << 31) - 1);
* aarch64.cc (try_fix_erratum_843419_optimized): Warning fix.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 4 | ||||
-rw-r--r-- | gold/aarch64.cc | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index a74d96c..cd52db08 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2015-07-22 Alan Modra <amodra@gmail.com> + + * aarch64.cc (try_fix_erratum_843419_optimized): Warning fix. + 2015-07-21 Cary Coutant <ccoutant@gmail.com> PR gold/18548 diff --git a/gold/aarch64.cc b/gold/aarch64.cc index 4153389..9f2ce74 100644 --- a/gold/aarch64.cc +++ b/gold/aarch64.cc @@ -2023,7 +2023,7 @@ AArch64_relobj<size, big_endian>::try_fix_erratum_843419_optimized( if (-(1 << 20) <= adr_imm && adr_imm < (1 << 20)) { // Convert 'adrp' into 'adr'. - Insntype adr_insn = adrp_insn & ((1 << 31) - 1); + Insntype adr_insn = adrp_insn & ((1u << 31) - 1); adr_insn = Insn_utilities:: aarch64_adr_encode_imm(adr_insn, adr_imm); elfcpp::Swap<32, big_endian>::writeval(adrp_view, adr_insn); |