-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix big endian Power system linkage stack parameter alignment
On big endian Power, there was an issue with system linkage that was causing parameters passed via the stack to be loaded incorrectly. Specifically, the ABI specifies that the entire GPR's contents should be saved on the stack, however the system linkage code was performing a load of only the parameter size. While this works on little endian systems, this causes the wrong bits of the argument to be loaded on big endian systems. This has been corrected by adjusting the stack offsets of parameters on big endian systems so that the correct bytes of the full GPR contents will be loaded. This should also correct #3525 on Power. Fixes: #4765 Signed-off-by: Ben Thomas <ben@benthomas.ca>
- Loading branch information
1 parent
b1ac27f
commit cb0ff02
Showing
3 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Although V2 is defined for both BE and LE, it is literally only supported/used by LE (which is also 64-bit only). Such that, the previous version of deciding saveParmsInLocalArea looks more correct (i.e. no caller's save area, if it is LE and there is no on-stack parm).
So far, I have only seen one instance of V2 BE Linux (which was not a major distro to begin with -- RedHat/SuSe/Ubuntu -- which we don't support anyway). The newer version could cause problems for existing (V1) BE 64bit Linux whose driver is still built off the same code base.