This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Don't print "Requires NEON" error message for M-profile
ClosedPublic

Authored by avieira on Feb 9 2018, 6:32 AM.

Details

Summary

Hi,

This patch makes the disassembler not print the "instruction requires:
NEON" message when compiling for M-profile as there are no NEON
extensions for M-profile.

Regards,
Andre

Diff Detail

Repository
rL LLVM

Event Timeline

avieira created this revision.Feb 9 2018, 6:32 AM
samparker accepted this revision.Feb 12 2018, 3:12 AM
samparker added a subscriber: samparker.

I would of thought it more useful to give a detailed error message, but it seems that is not the practise, so LGTM, thanks.

This revision is now accepted and ready to land.Feb 12 2018, 3:12 AM

For M-class, "invalid instruction" is indeed more accurate than requires NEON. We don't want people to think they can add "-mfpu=neon" or ".fpu neon" to an M-class to force assembling that code.

To have a better handling than this, we'd have to error out earlier saying M-class doesn't have NEON, which probably needs more knowledge than that piece of code has... LGTM too, for now.

To have a better handling than this, we'd have to error out earlier saying M-class doesn't have NEON, which probably needs more knowledge than that piece of code has...

We actually could do that here, the code immediately following the change is building the string to be printed, so we could just return a special "M-class doesn't have NEON" string. However, that would probably be a special-case too far, so I think this is fine as it is.

We actually could do that here, the code immediately following the change is building the string to be printed, so we could just return a special "M-class doesn't have NEON" string. However, that would probably be a special-case too far, so I think this is fine as it is.

Yeah, this would have to be a table-gen driven kind of change to cover all cases. For another patch.

This revision was automatically updated to reflect the committed changes.