This is an archive of the discontinued LLVM Phabricator instance.

[mips] Added support for the ERETNC instruction.
ClosedPublic

Authored by s.egerton on Jul 13 2015, 3:18 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

s.egerton updated this revision to Diff 29545.Jul 13 2015, 3:18 AM
s.egerton retitled this revision from to [mips] Added support for the ERETNC instruction..
s.egerton updated this object.
s.egerton added reviewers: dsanders, vkalintiris.
s.egerton added a subscriber: llvm-commits.
vkalintiris requested changes to this revision.Jul 19 2015, 2:02 PM
vkalintiris edited edge metadata.

We can re-use the classes ER_FM and ER_FT for the definition of the ERETNC instruction.

Also, I believe that we should use (or create) invalid-mips32r5.s in order to test errors for pre-R5 ISAs. Please. wait for Daniel's response on that.

lib/Target/Mips/MipsInstrFormats.td
656–664 ↗(On Diff #29545)

We can re-use the ER_FM format above by adding a boolean parameter that sets the 6th bit.

lib/Target/Mips/MipsInstrInfo.td
880–884 ↗(On Diff #29545)

We can just use ER_FT for the ERETNC definition since the classes are identical.

test/MC/Mips/mips32/valid-xfail.s
38 ↗(On Diff #29545)

@dsanders: I believe that we should place this test in invalid-mips32r5.s for pre-R5 ISAs, right?

This revision now requires changes to proceed.Jul 19 2015, 2:02 PM
dsanders edited edge metadata.Jul 20 2015, 3:11 AM

Thanks for reviewing this.

test/MC/Mips/mips32/valid-xfail.s
38 ↗(On Diff #29545)

Not quite. $isa/valid-xfail.s is for instructions that should be valid on $isa but currently xfail. $isa1/invalid-$isa2.s is for instructions that are valid on $isa1 and invalid on $isa2.

This is valid on MIPS32r5 and invalid on MIPS32 so it belongs in mips32r5/invalid-mips32{,r2,r3}.s

s.egerton updated this revision to Diff 30144.Jul 20 2015, 3:40 AM
s.egerton edited edge metadata.

Addressed reviewers comments. Also added dissambler tests.

vkalintiris accepted this revision.Jul 20 2015, 5:27 AM
vkalintiris edited edge metadata.

LGTM. I will apply this for you, since you don't have commit access yet.

This revision is now accepted and ready to land.Jul 20 2015, 5:27 AM
This revision was automatically updated to reflect the committed changes.