This patch fixes calculating address of label for non-pic ppc64.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I'm not overly familiar with this. I think @sfertile is more familiar with this, so I've added him as a reviewer.
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.
LGTM with a few minor comments about the test.
test/CodeGen/PowerPC/ppc-label2.ll | ||
---|---|---|
2 | Please add -ppc-asm-full-reg-names to the run steps. | |
4 | Since the codegen is expected to be identical between position-dependent and position-independent we should use the same check-prefix for both. | |
20 | 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) |
I tested this patch applied to trunk and can confirm this resolves the kernel build issue.
Please add -ppc-asm-full-reg-names to the run steps.