This is an archive of the discontinued LLVM Phabricator instance.

[mips] [IAS] Fix LA with relative label operands.
ClosedPublic

Authored by tomatabacu on Jun 17 2015, 3:10 AM.

Details

Summary

Call MCSymbolRefExpr::create() with a MCSymbol* argument, not with a StringRef
of the Symbol's name, in order to avoid creating invalid temporary symbols for
relative labels (e.g. {$,.L}tmp00, {$,.L}tmp10 etc.).

Diff Detail

Event Timeline

tomatabacu updated this revision to Diff 27820.Jun 17 2015, 3:10 AM
tomatabacu retitled this revision from to [mips] [IAS] Fix LA with $tmp symbol operands..
tomatabacu updated this object.
tomatabacu edited the test plan for this revision. (Show Details)
tomatabacu added a reviewer: dsanders.
tomatabacu added a subscriber: Unknown Object (MLST).
dsanders accepted this revision.Jun 17 2015, 3:36 AM
dsanders edited edge metadata.

LGTM with a couple nits.

In the commit message, '$tmp symbol operands' should be 'relative branches'.

Also, I suspect clang-format would format the changes differently. If this is the case could you format it the way clang-format would?

This revision is now accepted and ready to land.Jun 17 2015, 3:36 AM

'relative branches'

Sorry, 'relative labels'

tomatabacu retitled this revision from [mips] [IAS] Fix LA with $tmp symbol operands. to [mips] [IAS] Fix LA with relative label operands..Jun 17 2015, 3:51 AM
tomatabacu updated this object.
tomatabacu edited edge metadata.
tomatabacu updated this revision to Diff 27824.EditedJun 17 2015, 3:59 AM

Ran clang-format on changes.

tomatabacu closed this revision.Jun 17 2015, 5:34 AM