Closed dylanmckay closed 9 years ago
lol. I was working on the same patch.
Could you look over this?
Will do.
I finished my review. LGTM.
Oh, and since "register aliases" are ... something else, could you use "alt names" or the like in the final commit message?
Btw, I came across this little bug regarding alt names. Do you have any experience in pushing patches upstream?
I don't, but I am under the impression that you attach a patch, describing it in an email, and send it to the llvm-commits
list.
I changed the behaviour from extending MatchRegisterName
to adding MatchRegisterAltName
, and renamed everything from "register alias" to "alternative name".
I also sent the target-agnostic part of the patch upstream (see the mailing list post here).
Committed in b21056bae1f11906de38cbdc301525174291a7ac.
This PR changes
AVRRegisterInfo.td
to treatX
,Y
, andZ
as aliases ofr27:r26
,r29:r28
, andr31:r30
respectively.It modifies TableGen to match based on register aliases as well as their names in
AVRAsmParser::MatchRegisterName
.It also modifies the instruction printer to only print the
X
,Y
, andZ
aliases if the instruction has operands of typePTRREGS
,PTRDISPREGS
, orZREGS
. This causesmovw r30, r28
to be printed unchanged -movw r30, r28
, instead ofmovw Z, Y
.@agnat Could you look over this?