-
Notifications
You must be signed in to change notification settings - Fork 570
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#3699 ARM: Add padding to priv_mcontext_t for 8-byte alignment.
ef4482e caused a few additional failures. In particular, the child of a clone3 system call started with the register values shifted: R2 got the value that should be in R1 and so on. That caused the test linux.clone to fail. It turns out that some callers of insert_{push,pop}_all_registers expect that an unpadded priv_mcontext_t will be pushed/popped. Moving the 4-byte padding to above the struct instead of below it makes some tests pass but breaks others. So we add some padding to priv_mcontext_t itself, changing its size from 324 to 328. It will probably run slightly faster with the struct 8-byte aligned. Update insert_{push,pop}_all_registers and arm.asm for the new struct layout, with some additional changes to arm.asm: + Delete irrelevant X64 macros. + Document the macros more clearly (they can be found with grep). + Change SP only at start and end of function (standard practice, makes debugging easier). + Avoid writing below SP (compatible with signal handlers). Issue: #3699 Change-Id: I4977c5bf42e349d1085dbdecf3428e83a4a2399c
- Loading branch information
1 parent
359868c
commit df170af
Showing
3 changed files
with
62 additions
and
63 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