Page MenuHomePhabricator

[Mips][Assembler]Enable multiple and add instructions for mips64 target
ClosedPublic

Authored by vmedic on Feb 19 2015, 4:06 AM.

Details

Reviewers
dsanders
Summary

Multiple and add instructions for Mips have been defined to request mips32r2 platform, although they are request on mips64, which makes them available for mips4 and mips5 as well. Assembly of those instructions currently reports error for mips64platforms. This patch fixes the requested features and updates the corresponding test files.

Diff Detail

Event Timeline

vmedic updated this revision to Diff 20275.Feb 19 2015, 4:06 AM
vmedic retitled this revision from to [Mips][Assembler]Enable multiple and add instructions for mips64 target.
vmedic updated this object.
vmedic edited the test plan for this revision. (Show Details)
vmedic added a reviewer: dsanders.
vmedic added a subscriber: Unknown Object (MLST).
dsanders edited edge metadata.Feb 24 2015, 7:00 AM

Multiple and add instructions for Mips have been defined to request mips32r2 platform, although they
are request on mips64, which makes them available for mips4 and mips5 as well. Assembly of those
instructions currently reports error for mips64platforms. This patch fixes the requested features and
updates the corresponding test files.

The English here is quite difficult to understand but if I understand correctly then these instructions are currently available in mips32r2/mips64r2 and later but should also be available in mips4, mips5, and mips64. Looking at the docs, I agree.


LGTM with the test cases sorted properly and the missing 64-NONAN case added.

One thing to mention is that we can't use madd.[ds] or msub.[ds] for the R8000 series without fast-math being enabled. This is because these processors do a fused multiply add/sub instead of rounding the intermediate as per IEEE754. Given that we only support a generic MIPS-IV this isn't a problem for now but we should note this with a FIXME somewhere.

test/CodeGen/Mips/fmadd1.ll
166–168

You need to add the 64-NONAN case too.

test/MC/Mips/mips4/valid.s
141–149

The instructions in this file should be sorted alphabetically.

test/MC/Mips/mips5/valid.s
142–149

The instructions in this file should be sorted alphabetically.

test/MC/Mips/mips64/valid.s
147–154

The instructions in this file should be sorted alphabetically.

dsanders accepted this revision.Feb 24 2015, 7:00 AM
dsanders edited edge metadata.
This revision is now accepted and ready to land.Feb 24 2015, 7:00 AM

If you wouldn't mind making the ABI option change to the test separately I'd appreciate it (also, the obvious sed command is pre-approved). There are also other tests that do the exact same thing.

Thanks!

-eric

test/CodeGen/Mips/fmadd1.ll
11

Please submit this separately.

vmedic closed this revision.Feb 25 2015, 7:27 AM

Command line options committed revision 230482.
Other changes committed revision 230500.