The PPC64 V2 ABI restores the toc base by loading from an offset of 24 from r1. This patch fixes the offset and updates the testcases from V1 to V2. It also issues an error when a nop is missing after a call to an external function.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM with these fixes.
lld/ELF/InputSection.cpp | ||
---|---|---|
746 | error() automatically adds "error: " at beginning of a message, so please remove it from your message. Error messages shouldn't end with a full stop. If you flip the condition, you can reduce the nesting level like this. if (BufLoc + 8 > BufEnd || read32(BufLoc + 4) != 0x60000000) { error(...); return; } write32(...) |
Comment Actions
It would be nice to have a test similar to ppc64-error-toc-restore.s that makes sure we emit the error for a missing nop on a tail call as well.
error() automatically adds "error: " at beginning of a message, so please remove it from your message. Error messages shouldn't end with a full stop.
If you flip the condition, you can reduce the nesting level like this.