This is an archive of the discontinued LLVM Phabricator instance.

[mips] Set microMIPS ASE flag
ClosedPublic

Authored by abeserminji on Nov 21 2017, 9:35 AM.

Details

Summary

If code contains a function that has 'micromips' attribute, and it's compiled without -mmicromips flag, the generated object file does not contain AFL_ASE_MICROMIPS flag in the MIPS.abiflags section. Same result occurs when assembly code contains '.set micromips' directive.

This patch corrects such behavior by updating ABI info when subtarget is in microMips mode.

Diff Detail

Event Timeline

abeserminji created this revision.Nov 21 2017, 9:35 AM

Fixed long run lines in tests.

sdardis accepted this revision.Nov 22 2017, 2:57 AM

LGTM with inline nits addressed.

test/CodeGen/Mips/micromips-ase-function-attribute.ll
2

Three nits: break the run line over multiple lines using '\', as it's longer than 80.

You can drop the check-prefix here and just use 'CHECK:'.

Also, match the 'ASEs [' and the closing ']'

test/MC/Mips/micromips-ase-directive.s
2

Same here.

This revision is now accepted and ready to land.Nov 22 2017, 2:57 AM
abeserminji marked 2 inline comments as done.

Comments addressed.

This revision was automatically updated to reflect the committed changes.