This is an archive of the discontinued LLVM Phabricator instance.

[mips] Support 64-bit offsets for lb/sb/ld/sd/lld ... instructions
ClosedPublic

Authored by atanasyan on May 24 2018, 4:20 AM.

Details

Summary

The MipsAsmParser::loadImmediate can load immediates of various sizes into a register. Idea of this change is to use loadImmediate in the MipsAsmParser::expandMemInst method to load offset into a register and then call required load/store instruction.

The patch removes separate expandLoadInst and expandStoreInst methods and does everything in the expandMemInst method to escape code duplication.

Diff Detail

Repository
rL LLVM

Event Timeline

atanasyan created this revision.May 24 2018, 4:20 AM
smaksimovic accepted this revision.Jun 1 2018, 7:45 AM

LGTM.

test/MC/Mips/mips64-expansions.s
273 ↗(On Diff #148374)

Minor nit: ... with offsets exceeding 16 bits in size.

This revision is now accepted and ready to land.Jun 1 2018, 7:45 AM
This revision was automatically updated to reflect the committed changes.

Thanks for review.