diff options
author | Dominik Vogt <vogt@linux.vnet.ibm.com> | 2015-11-09 17:12:57 +0100 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2015-11-09 17:12:57 +0100 |
commit | 8d3842cd156eb6cd6cd6c68c49c090b8f9452a2d (patch) | |
tree | aee7b14c399febf1c61e4b609a4393c5345841b8 /gas/config/tc-ia64.c | |
parent | c4e0beacd71d4a65cfbe27466ae3d0403c39ead5 (diff) | |
download | fsf-binutils-gdb-8d3842cd156eb6cd6cd6c68c49c090b8f9452a2d.zip fsf-binutils-gdb-8d3842cd156eb6cd6cd6c68c49c090b8f9452a2d.tar.gz fsf-binutils-gdb-8d3842cd156eb6cd6cd6c68c49c090b8f9452a2d.tar.bz2 |
gas: Fix left shift of negative value.
This patch fixes all occurences of left-shifting negative constants in C cod
which is undefined by the C standard.
gas/ChangeLog:
* read.c (parse_bitfield_cons): Fix left shift of negative value.
* config/tc-xstormy16.c (md_section_align): Likewise.
* config/tc-xgate.c (md_section_align): Likewise.
* config/tc-visium.c (md_section_align): Likewise.
* config/tc-v850.c (md_section_align): Likewise.
* config/tc-tic6x.c (md_section_align): Likewise.
* config/tc-sh.c (SH64PCREL32_M, SH64PCREL48_M, SH64PCREL32_M)
(MOVI_32_M, MOVI_48_M, MOVI_32_M, md_section_align): Likewise.
* config/tc-sh64.c (shmedia_md_estimate_size_before_relax): Likewise.
* config/tc-score.c (s3_section_align): Likewise.
* config/tc-score7.c (s7_section_align): Likewise.
* config/tc-s390.c (md_section_align): Likewise.
* config/tc-rx.c (md_section_align): Likewise.
* config/tc-rl78.c (md_section_align): Likewise.
* config/tc-ppc.c (md_section_align): Likewise.
* config/tc-or1k.c (md_section_align): Likewise.
* config/tc-nds32.c (md_section_align): Likewise.
* config/tc-mt.c (md_section_align): Likewise.
* config/tc-msp430.c (md_section_align): Likewise.
* config/tc-mn10300.c (md_section_align): Likewise.
* config/tc-mn10200.c (md_section_align): Likewise.
* config/tc-mips.c (md_section_align): Likewise.
* config/tc-microblaze.c (parse_imm): Likewise.
* config/tc-mep.c (md_section_align): Likewise.
* config/tc-m68k.c (md_section_align): Likewise.
* config/tc-m68hc11.c (md_section_align): Likewise.
* config/tc-m32r.c (md_section_align): Likewise.
* config/tc-m32c.c (md_section_align): Likewise.
* config/tc-lm32.c (md_section_align): Likewise.
* config/tc-iq2000.c (md_section_align): Likewise.
* config/tc-ip2k.c (md_section_align): Likewise.
* config/tc-ia64.c (dot_save, dot_vframe): Likewise.
* config/tc-i960.c (md_number_to_field, md_section_align): Likewise.
* config/tc-i386.c (md_section_align): Likewise.
* config/tc-i370.c (md_section_align): Likewise.
* config/tc-frv.c (md_section_align): Likewise.
* config/tc-fr30.c (md_section_align): Likewise.
* config/tc-epiphany.c (md_section_align): Likewise.
* config/tc-d30v.c (md_section_align): Likewise.
* config/tc-d10v.c (md_section_align): Likewise.
* config/tc-cr16.c (l_cons): Likewise.
* config/tc-bfin.c (md_section_align): Likewise.
* config/tc-arm.c (md_section_align): Likewise.
* config/tc-arc.c (md_section_align): Likewise.
* config/bfin-parse.y (expr_1): Likewise.
gas/testsuite/ChangeLog:
* gas/all/test-gen.c (random_order_16s, random_order_24s)
(random_order_32s): Fix left shift of negative value.
Diffstat (limited to 'gas/config/tc-ia64.c')
-rw-r--r-- | gas/config/tc-ia64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index ea7dcc6..8a34fea 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -3339,7 +3339,7 @@ dot_vframe (int dummy ATTRIBUTE_UNUSED) if (! (unwind.prologue_mask & 2)) add_unwind_entry (output_psp_gr (reg), NOT_A_CHAR); else if (reg != unwind.prologue_gr - + (unsigned) popcount (unwind.prologue_mask & (-2 << 1))) + + (unsigned) popcount (unwind.prologue_mask & -(2 << 1))) as_warn (_("Operand of .vframe contradicts .prologue")); } @@ -3421,7 +3421,7 @@ dot_save (int dummy ATTRIBUTE_UNUSED) if (! (unwind.prologue_mask & 4)) add_unwind_entry (output_pfs_gr (reg2), NOT_A_CHAR); else if (reg2 != unwind.prologue_gr - + (unsigned) popcount (unwind.prologue_mask & (-4 << 1))) + + (unsigned) popcount (unwind.prologue_mask & -(4 << 1))) as_warn (_("Second operand of .save contradicts .prologue")); break; case REG_AR + AR_LC: @@ -3440,7 +3440,7 @@ dot_save (int dummy ATTRIBUTE_UNUSED) if (! (unwind.prologue_mask & 1)) add_unwind_entry (output_preds_gr (reg2), NOT_A_CHAR); else if (reg2 != unwind.prologue_gr - + (unsigned) popcount (unwind.prologue_mask & (-1 << 1))) + + (unsigned) popcount (unwind.prologue_mask & -(1 << 1))) as_warn (_("Second operand of .save contradicts .prologue")); break; case REG_PRIUNAT: |