-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PPC][AIX] Local variable needing higher alignment shows r31 not saved with r30 as required by ABI #96411
Comments
@llvm/issue-subscribers-backend-powerpc Author: Hubert Tong (hubert-reinterpretcast)
When a local variable requires alignment higher than 16, Clang/LLVM appears to use `r30` to hold the stack pointer on entry to the function.
As a callee-saved register, the value of When the ABI rule is violated, the value of Source (
|
Posted PR for review: #100182 |
When the base pointer r30 is used to hold the stack pointer, r30 is spilled in the prologue. On AIX registers are saved from highest to lowest, so r31 also needs to be saved. Fixes #96411
When the base pointer r30 is used to hold the stack pointer, r30 is spilled in the prologue. On AIX registers are saved from highest to lowest, so r31 also needs to be saved. Fixes llvm#96411 (cherry picked from commit d07f106)
When the base pointer r30 is used to hold the stack pointer, r30 is spilled in the prologue. On AIX registers are saved from highest to lowest, so r31 also needs to be saved. Fixes llvm#96411 (cherry picked from commit d07f106)
When the base pointer r30 is used to hold the stack pointer, r30 is spilled in the prologue. On AIX registers are saved from highest to lowest, so r31 also needs to be saved. Fixes llvm#96411
When a local variable requires alignment higher than 16, Clang/LLVM appears to use
r30
to hold the stack pointer on entry to the function.As a callee-saved register, the value of
r30
is saved; however, the AIX ABI requires that callee-saved (a.k.a. "non-volatile") registers are saved from highest to lowest, meaning thatr31
should also be saved. The save ofr31
does not appear to be done (with optimization enabled) as required.When the ABI rule is violated, the value of
r31
can be corrupted during EH unwinding.Source (
<stdin>
):Compiler invocation:
Compiler output (partial):
Compiler version info (
clang++ -v
):The text was updated successfully, but these errors were encountered: