On Fri, 11 Jun 2004 cgd@broadcom.com wrote:
in retrospect, the 'B' variation probably wasn't the greatest idea.
If it were removed (leaving 'c' and 'c','q' variations), I don't know
that any real harm would occur.
It may be very confusing to people who expect that the break code will
translate into the instruction in an obvious way, and obviously it
would mess up use of 20-bit codes, but i don't know how prevalent that
is.
Unfortunately, at this point, Linux should probably accept the
divide-by-zero code in both locations.
(Really, from day one, assemblers probably should have accepted a
20-bit code. I just checked my copy of the Kane r2000/r3000 book, and
it was 20-bit all the way back then. If i had to guess, i'd guess
that gas was copying a non-gnu assembler's behaviour. In any case,
water under the bridge.)
As it's at least annoying to have different break codes for divisions
expanded by gcc explicitly and ones created implicitly by gas, here's the
most reasonable (IMO) approach to fix that. I think it should have been
implemented this way originally (if at all).
gas/testsuite/:
2004-06-22 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* gas/mips/break20.s: Test the "break20" alias.
* gas/mips/break20.d: Results for the test.
* gas/mips/mips32.s: Replace "break" with "break20".
* gas/mips/set-arch.s: Likewise.
* gas/mips/mips32.d: Adjust for the new output.
* gas/mips/set-arch.d: Likewise.
opcodes/:
2004-06-22 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* mips-opc.c (mips_builtin_opcodes): Replace the MIPS32 ISA
specific "break" encoding with a "break20" alias accepted for any
ISA.