This is an archive of the discontinued LLVM Phabricator instance.

[mips] [IAS] Add support for LASym with identical source and destination register operands.
ClosedPublic

Authored by tomatabacu on Apr 30 2015, 3:10 AM.

Details

Summary

In this case, we're supposed to load the address of the symbol in AT and then ADDu it with the source register and
put it in the destination register.

Diff Detail

Event Timeline

tomatabacu updated this revision to Diff 25965.May 18 2015, 7:21 AM

Rebased on top of D9523.

dsanders accepted this revision.May 19 2015, 6:18 AM
dsanders edited edge metadata.

LGTM with the repetition removed.

lib/Target/Mips/AsmParser/MipsAsmParser.cpp
2029–2030

Instead of repeating `UseAT ? ATReg : DstReg`, why not define a new variable for the temporary register to use?

This revision is now accepted and ready to land.May 19 2015, 6:18 AM
tomatabacu updated this revision to Diff 27517.Jun 11 2015, 9:07 AM
tomatabacu edited edge metadata.

Addressed review nit.
Rebased (for Sean Bruno's convenience).

Toma tells me he's going to untangle this patch from the patches it depends on. The problem is that a couple of those patches have uncovered badly broken MCExpr simplification which is blocking them.

tomatabacu updated this revision to Diff 27573.Jun 12 2015, 6:02 AM

Replaced the UseAT variable with its corresponding condition, as it was being used only once.
Put the "SrcReg != Mips::NoRegister" condition in a variable, as it is now used twice.
Shortened the name of IntermediateDstReg to TmpReg.
Rebased on top of the new D9523 and D9348.
Removed unnecessary dependencies on other patches.

tomatabacu updated this revision to Diff 27574.Jun 12 2015, 6:14 AM

Moved ATReg inside the if block, as it is not used again after that.

tomatabacu updated this revision to Diff 27924.Jun 18 2015, 3:29 AM

Rebased.

I think this is the final version of this patch, as all of its dependencies have been committed.
Daniel, could take another look at this please ?

LGTM. Thanks

tomatabacu closed this revision.Jun 22 2015, 5:12 AM