IBM zSystems: Accept (. - 0x100000000) PCRel32 operands
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 9 May 2022 19:57:28 +0000 (21:57 +0200)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 9 May 2022 19:59:59 +0000 (21:59 +0200)
commit0cfd6cffde32726ca69cde6ed3cc1ece21b9cf7c
treeb8fb529ac16734d77b3d6fc911c7f0c54c3e1e8b
parent77399b529808626f764bcc347be0d6e8b6b167ce
IBM zSystems: Accept (. - 0x100000000) PCRel32 operands

as does not accept instructions like brasl %r0,.-0x100000000, because
of two problems with the generic overflow check:

1. PCRel32 operands are signed, but are treated as unsigned.

2. The allowed range for these operands is [-(1 << 32), (1 << 32) - 1],
   and not [-(1 << 31), (1 << 31) - 1].

Fix both by disabling the generic overflow check - it's not needed,
because s390_insert_operand () performs its own.

gas/

        * config/tc-s390.c (md_gather_operands): Set fx_no_overflow.
        * testsuite/gas/s390/s390.exp: Add zarch-z900-err.
        * testsuite/gas/s390/esa-z900.d: New test.
        * testsuite/gas/s390/esa-z900.s: New test.
        * testsuite/gas/s390/zarch-z900-err.l: New test.
        * testsuite/gas/s390/zarch-z900-err.s: New test.
gas/config/tc-s390.c
gas/testsuite/gas/s390/esa-z900.d
gas/testsuite/gas/s390/esa-z900.s
gas/testsuite/gas/s390/s390.exp
gas/testsuite/gas/s390/zarch-z900-err.l [new file with mode: 0644]
gas/testsuite/gas/s390/zarch-z900-err.s [new file with mode: 0644]