[PATCH] Add .set arch=FOO support to MIPS gas.

cgd@broadcom.com cgd@broadcom.com
Mon Jun 30 19:19:00 GMT 2003


So, before committing my tweaked version of the .set arch=FOO code, I
thought i'd, oh, compile and test it.  8-)

Running make/make check for:

        mips-elf
        mips-linux
        mips-netbsd
        mips64-elf
        mips64-linux
        mipsisa32-elf
        mipsisa32r2-elf
        mipsisa64-elf
        mipsisa64sb1-elf

I found that the existing ".set arch=FOO" test failed for *all* of
those except mips64-linux!

it looks like you're hard-coding assumptions about the register names
used by the ABI, in the disassembly for the existing test.

If you're actually bent on doing this, you should put:

        -M reg-names=n32

or similar on the objdump options line in the .d file.

(personally, when i code testsuite entries these days, I tend to use
"-M reg-names=numeric" because it makes it that much easier to verify
that input == output.)


Given that, AFAICT, the only target that passed the test was the one
you were probably testing, i'd encourage you to test more
architectures.  8-)

In case you're interested, I've included my (quick hack-ish) binutils
test scripts below.


cgd

-------------- next part --------------
A non-text attachment was scrubbed...
Name: testscripts.shar
Type: application/x-shar
Size: 9669 bytes
Desc: binutils test scripts
URL: <https://sourceware.org/pipermail/binutils/attachments/20030630/aea479d7/attachment.shar>


More information about the Binutils mailing list