This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add support for unpredictable MVN instructions.
ClosedPublic

Authored by yroux on Jan 10 2018, 5:45 AM.

Details

Summary

This fixes bugzilla 33011
https://bugs.llvm.org/show_bug.cgi?id=33011

Defines bits {19-16} as zero or unpredictable as specified by the ARM ARM in
sections A8.8.116 and A8.8.117.

It fixes also the usage of PC register as destination register for MVN
register-shifted register version as specified in A8.8.117.

Validated with regression testsuite passed without regression.

Diff Detail

Repository
rL LLVM

Event Timeline

yroux created this revision.Jan 10 2018, 5:45 AM
olista01 added inline comments.Jan 17 2018, 4:38 AM
lib/Target/ARM/ARMInstrInfo.td
3925 ↗(On Diff #129260)

The register class changes will also affect assembly, could you add tests for them?

test/MC/Disassembler/ARM/unpredictable-MVN-arm.txt
3 ↗(On Diff #129260)

Could you add comments to these showing which instructions they are, and which fields are invalid?

yroux added a comment.Jan 31 2018, 4:22 AM

Thanks for the review Oliver,

here is the new version of the patch.

Notice that the added assembly test doesn't cover all the cases of PC usage in MVN instruction because currently it doesn't report an error in these case:

	mvn	r5, pc, lsl r7
	mvn	r5, r6, lsl pc

Thus, I'm only testing here the register change impact on Rd, and I'm trying to fix MC and will complete the test coverage in a second patch.
Does it sounds good ?

yroux updated this revision to Diff 132138.Jan 31 2018, 4:23 AM
olista01 accepted this revision.Jan 31 2018, 4:58 AM

LGTM, thanks!

This revision is now accepted and ready to land.Jan 31 2018, 4:58 AM
This revision was automatically updated to reflect the committed changes.