Page MenuHomePhabricator

[PowerPC] Fix label address calculation for ppc64

Authored by spetrovic on Aug 20 2018, 4:19 AM.


Diff Detail


Event Timeline

spetrovic created this revision.Aug 20 2018, 4:19 AM
kbarton added a subscriber: sfertile.

I'm not overly familiar with this. I think @sfertile is more familiar with this, so I've added him as a reviewer.

nemanjai accepted this revision.Aug 27 2018, 7:56 AM

This seems to make sense to me and it resolves the kernel build issue. If @sfertile sees something wrong with the patch, he can chime in before or after the commit.

This revision is now accepted and ready to land.Aug 27 2018, 7:56 AM
sfertile accepted this revision.Aug 27 2018, 8:23 AM

LGTM with a few minor comments about the test.

1 ↗(On Diff #161454)

Please add -ppc-asm-full-reg-names to the run steps.

3 ↗(On Diff #161454)

Since the codegen is expected to be identical between position-dependent and position-independent we should use the same check-prefix for both.

19 ↗(On Diff #161454)

The addis will always use the toc-pointer (r2) as the second operand so we should be checking for it directly.

addis r3, r2, .LC0@toc@ha
ld r3, .LC0@toc@l(r3)
spetrovic updated this revision to Diff 162867.Aug 28 2018, 7:55 AM
spetrovic marked 3 inline comments as done.

Comments Addressed. Thanks for the review.

jsji added a subscriber: jsji.Sep 7 2018, 9:05 AM

Committing this should also resolve

joel added a subscriber: joel.Sep 10 2018, 3:24 AM

I tested this patch applied to trunk and can confirm this resolves the kernel build issue.

Do you need help committing this?

This revision was automatically updated to reflect the committed changes.