This is an archive of the discontinued LLVM Phabricator instance.

Sparc: support the "set" synthetic instruction.
ClosedPublic

Authored by jyknight on Apr 17 2015, 1:39 PM.

Details

Summary

This pseudo-instruction expands into 'sethi' and 'or' instructions,
or, just one of them, if the other isn't necessary for a given value.

Diff Detail

Repository
rL LLVM

Event Timeline

jyknight updated this revision to Diff 23966.Apr 17 2015, 1:39 PM
jyknight retitled this revision from to Sparc: support the "set" synthetic instruction..
jyknight updated this object.
jyknight edited the test plan for this revision. (Show Details)
jyknight added a reviewer: venkatra.
jyknight added a subscriber: Unknown Object (MLST).
venkatra requested changes to this revision.Apr 28 2015, 7:43 PM
venkatra edited edge metadata.
venkatra added inline comments.
lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
81 ↗(On Diff #23966)

Change the function name to expandSET().

According to the coding standard, function names should start with lower case.

438 ↗(On Diff #23966)

Use MCValOp itself.

This revision now requires changes to proceed.Apr 28 2015, 7:43 PM
jyknight updated this revision to Diff 24654.Apr 29 2015, 1:22 PM
jyknight edited edge metadata.

Fixed nits

jyknight added inline comments.Apr 29 2015, 1:23 PM
lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
81 ↗(On Diff #23966)

Done.

438 ↗(On Diff #23966)

Done.

echristo accepted this revision.May 13 2015, 3:23 PM
echristo added a reviewer: echristo.
echristo added a subscriber: echristo.

LGTM with an inline comment to fix up. If there's going to be more of these you might want to look into a processInstruction routine ala ARM.

-eric

lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
431 ↗(On Diff #24654)

No need to pass this in, you can just use getContext().

Feel free to clean up any other uses as well.

This revision was automatically updated to reflect the committed changes.