diff options
author | Pavel Chupin <pavel.v.chupin@intel.com> | 2013-10-21 20:20:53 +0400 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-10-21 17:36:28 -0700 |
commit | 33a209e57595fbb7934fcc4606d2b0dd0de688ad (patch) | |
tree | 6616eec2a39fbe149e5ea794484299aead39a6ad /libc/arch-x86_64/bionic | |
parent | f4ac8ba566d80679ccc346b3b0af4b46d394319b (diff) | |
download | bionic-33a209e57595fbb7934fcc4606d2b0dd0de688ad.zip bionic-33a209e57595fbb7934fcc4606d2b0dd0de688ad.tar.gz bionic-33a209e57595fbb7934fcc4606d2b0dd0de688ad.tar.bz2 |
Fix 16-byte stack alignment requirement for x86_64 ABI
Change-Id: I43304803ac54c8688c61688bd96c7160614172d4
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Diffstat (limited to 'libc/arch-x86_64/bionic')
-rw-r--r-- | libc/arch-x86_64/bionic/clone.S | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/arch-x86_64/bionic/clone.S b/libc/arch-x86_64/bionic/clone.S index 2ae0e85..7511e86 100644 --- a/libc/arch-x86_64/bionic/clone.S +++ b/libc/arch-x86_64/bionic/clone.S @@ -59,10 +59,11 @@ ENTRY(__pthread_clone) # We're in the child now, so call __thread_entry # with the arguments from the child stack moved into - # the appropriate registers. - popq %rdi # fn - popq %rsi # arg - popq %rdx # tls + # the appropriate registers. We avoid pop here to keep + # the required 16-byte stack alignment. + movq (%rsp), %rdi # fn + movq 8(%rsp), %rsi # arg + movq 16(%rsp), %rdx # tls call __thread_entry hlt 2: |