This is an archive of the discontinued LLVM Phabricator instance.

[mips] Add support for unaligned load/store macros.
ClosedPublic

Authored by vkalintiris on Nov 17 2016, 4:59 AM.

Details

Reviewers
sdardis
Summary

Add missing unaligned store macros (ush/usw) and fix the exisiting
implementation of the unaligned load macros in order to generate
identical expansions with the GNU assembler.

Event Timeline

vkalintiris retitled this revision from to [mips] Add support for unaligned load/store macros..
vkalintiris updated this object.
vkalintiris added a reviewer: sdardis.
vkalintiris set the repository for this revision to rL LLVM.
vkalintiris added a subscriber: llvm-commits.
sdardis accepted this revision.Nov 17 2016, 8:21 AM
sdardis edited edge metadata.

LGTM with some nits addressed, and another set of test cases.

I'm seeing differences between GAS' output and LLVM's output when the immediate has to be loaded with loadImmediate. The difference (extra moves) is mostly cosmetic and I am not too concerned with them.

lib/Target/Mips/AsmParser/MipsAsmParser.cpp
3325

Nit, indentation.

3339–3340

Restore this comment.

3375

Nit, indentation.

3426

Nit: indentation.

3473

This should be using the register variant of 'or'. This is more for consistency with the GNU and LLVM toolchain for moving the contents of one register. Also, add test cases to cover this case: ulw $8, <cst>($8).

test/MC/Mips/mips-expansions.s
692

These moves aren't appearing from GAS' output. They're add's coming from loadImmediate.

This revision is now accepted and ready to land.Nov 17 2016, 8:21 AM
vkalintiris closed this revision.Nov 22 2016, 8:59 AM
vkalintiris marked 6 inline comments as done.

Thanks for reviewing this! I committed this in r287646.