This patch fixes calculating address of label for non-pic ppc64.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I'm not overly familiar with this. I think @sfertile is more familiar with this, so I've added him as a reviewer.
Comment Actions
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.
Comment Actions
LGTM with a few minor comments about the test.
test/CodeGen/PowerPC/ppc-label2.ll | ||
---|---|---|
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) |
Comment Actions
I tested this patch applied to trunk and can confirm this resolves the kernel build issue.