x86: Handle {disp32} for (%bp)/(%ebp)/(%rbp)
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Jul 2020 10:41:16 +0000 (03:41 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Jul 2020 10:55:53 +0000 (03:55 -0700)
commit1a02d6b0ff80048df106cbb776a550278f8c9d9c
tree75a0bfd9d3535aa8d3f27240e3385348e4fe34c7
parent43d5901dedc7d0eefd7b677f555a4cbf470ee455
x86: Handle {disp32} for (%bp)/(%ebp)/(%rbp)

Since (%bp)/(%ebp)/(%rbp) are encoded as 0(%bp)/0(%ebp)/0(%rbp), use
disp32/disp16 on 0(%bp)/0(%ebp)/0(%rbp) for {disp32}.

Note: Since there is no disp32 on 0(%bp), use disp16 instead.

PR gas/26305
* config/tc-i386.c (build_modrm_byte): Use disp32/disp16 on
(%bp)/(%ebp)/(%rbp) for {disp32}.
* doc/c-i386.texi: Update {disp32} documentation.
* testsuite/gas/i386/pseudos.s: Add (%bp)/(%ebp) tests.
* testsuite/gas/i386/x86-64-pseudos.s: Add (%ebp)/(%rbp) tests.
* testsuite/gas/i386/pseudos.d: Updated.
* testsuite/gas/i386/x86-64-pseudos.d: Likewise.
gas/ChangeLog
gas/config/tc-i386.c
gas/doc/c-i386.texi
gas/testsuite/gas/i386/pseudos.d
gas/testsuite/gas/i386/pseudos.s
gas/testsuite/gas/i386/x86-64-pseudos.d
gas/testsuite/gas/i386/x86-64-pseudos.s