gas: Fix left shift of negative value.
authorDominik Vogt <vogt@linux.vnet.ibm.com>
Mon, 9 Nov 2015 16:12:57 +0000 (17:12 +0100)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Mon, 9 Nov 2015 16:12:57 +0000 (17:12 +0100)
commit8d3842cd156eb6cd6cd6c68c49c090b8f9452a2d
treeaee7b14c399febf1c61e4b609a4393c5345841b8
parentc4e0beacd71d4a65cfbe27466ae3d0403c39ead5
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.
48 files changed:
gas/ChangeLog
gas/config/bfin-parse.y
gas/config/tc-arc.c
gas/config/tc-arm.c
gas/config/tc-bfin.c
gas/config/tc-cr16.c
gas/config/tc-d10v.c
gas/config/tc-d30v.c
gas/config/tc-epiphany.c
gas/config/tc-fr30.c
gas/config/tc-frv.c
gas/config/tc-i370.c
gas/config/tc-i386.c
gas/config/tc-i960.c
gas/config/tc-ia64.c
gas/config/tc-ip2k.c
gas/config/tc-iq2000.c
gas/config/tc-lm32.c
gas/config/tc-m32c.c
gas/config/tc-m32r.c
gas/config/tc-m68hc11.c
gas/config/tc-m68k.c
gas/config/tc-mep.c
gas/config/tc-microblaze.c
gas/config/tc-mips.c
gas/config/tc-mn10200.c
gas/config/tc-mn10300.c
gas/config/tc-msp430.c
gas/config/tc-mt.c
gas/config/tc-nds32.c
gas/config/tc-or1k.c
gas/config/tc-ppc.c
gas/config/tc-rl78.c
gas/config/tc-rx.c
gas/config/tc-s390.c
gas/config/tc-score.c
gas/config/tc-score7.c
gas/config/tc-sh.c
gas/config/tc-sh64.c
gas/config/tc-tic6x.c
gas/config/tc-v850.c
gas/config/tc-visium.c
gas/config/tc-xc16x.c
gas/config/tc-xgate.c
gas/config/tc-xstormy16.c
gas/read.c
gas/testsuite/ChangeLog
gas/testsuite/gas/all/test-gen.c