aboutsummaryrefslogtreecommitdiff
path: root/bfd/pe-sh.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@redhat.com>2024-07-19 09:42:56 +0100
committerMaciej W. Rozycki <macro@redhat.com>2024-07-19 09:42:56 +0100
commit875ac09b1217981fcd8d72908f45ecd9540fe8b5 (patch)
treee598634538e908e65ca5dc97ce67caf6da4cb0dc /bfd/pe-sh.c
parent5dd9c473f6bf04f12ec93182ccfa165e962e3500 (diff)
downloadgdb-875ac09b1217981fcd8d72908f45ecd9540fe8b5.zip
gdb-875ac09b1217981fcd8d72908f45ecd9540fe8b5.tar.gz
gdb-875ac09b1217981fcd8d72908f45ecd9540fe8b5.tar.bz2
MIPS/GAS: Handle --trap command-line option dynamically
We have an ISA check for the '--trap' command-line option that reports its incompatibility with the MIPS I architecture. It doesn't prevent trap instructions from being enabled though, so when attempt is made to emit one in an expansion of one of the division or multiplication macros an assertion failure triggers: .../gas/testsuite/gas/mips/brtr-opt.s: Assembler messages: .../gas/testsuite/gas/mips/brtr-opt.s:3: Error: trap exception not supported at ISA 1 .../gas/testsuite/gas/mips/brtr-opt.s:9: Warning: divide by zero .../gas/testsuite/gas/mips/brtr-opt.s:9: Internal error in macro_build at .../gas/config/tc-mips.c:9064. Please report this bug. The same assertion failure triggers without an earlier error message when the initial ISA is compatible with the '--trap', however at the time an attempt is made to emit a trap instruction from a division or multiplication macro the ISA has been changed by a '.set' pseudo-op to an incompatible one. With the way the situations are mishandled it seems unlikely that anyone relies on the current semantics and a sane approach is to decide on the fly according to the currently selected ISA as to whether to emit trap or breakpoint instructions in the case where '--trap' has been used. Change our code to do so then and clarify that in the manual, which is not explicit about how '--trap' is handled with a changing ISA. Mention the change in NEWS too since it's a applies to a user option.
Diffstat (limited to 'bfd/pe-sh.c')
0 files changed, 0 insertions, 0 deletions