am a529efac: Merge "Add missing cfi directives for x86 assembler."

* commit 'a529efac4efa4641186fef5003752cc1c43ec763':
  Add missing cfi directives for x86 assembler.
This commit is contained in:
Christopher Ferris 2015-04-15 00:00:48 +00:00 committed by Android Git Automerger
commit ffecd6cef9
3 changed files with 30 additions and 0 deletions

View file

@ -3,8 +3,14 @@
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
ENTRY(__bionic_clone)
pushl %ebx
.cfi_adjust_cfa_offset 4
.cfi_rel_offset ebx, 0
pushl %esi
.cfi_adjust_cfa_offset 4
.cfi_rel_offset esi, 0
pushl %edi
.cfi_adjust_cfa_offset 4
.cfi_rel_offset edi, 0
# Load system call arguments into registers.
movl 16(%esp), %ebx # flags
@ -46,8 +52,14 @@ ENTRY(__bionic_clone)
# We're the parent; nothing to do.
.L_bc_return:
popl %edi
.cfi_adjust_cfa_offset -4
.cfi_restore edi
popl %esi
.cfi_adjust_cfa_offset -4
.cfi_restore esi
popl %ebx
.cfi_adjust_cfa_offset -4
.cfi_restore ebx
ret
END(__bionic_clone)
.hidden __bionic_clone

View file

@ -15,9 +15,17 @@
ENTRY(syscall)
# Push the callee save registers.
push %ebx
.cfi_adjust_cfa_offset 4
.cfi_rel_offset ebx, 0
push %esi
.cfi_adjust_cfa_offset 4
.cfi_rel_offset esi, 0
push %edi
.cfi_adjust_cfa_offset 4
.cfi_rel_offset edi, 0
push %ebp
.cfi_adjust_cfa_offset 4
.cfi_rel_offset ebp, 0
# Load all the arguments from the calling frame.
# (Not all will be valid, depending on the syscall.)
@ -43,8 +51,16 @@ ENTRY(syscall)
1:
# Restore the callee save registers.
pop %ebp
.cfi_adjust_cfa_offset -4
.cfi_restore ebp, 0
pop %edi
.cfi_adjust_cfa_offset -4
.cfi_restore edi, 0
pop %esi
.cfi_adjust_cfa_offset -4
.cfi_restore esi, 0
pop %ebx
.cfi_adjust_cfa_offset -4
.cfi_restore ebx, 0
ret
END(syscall)

View file

@ -32,6 +32,8 @@
ENTRY(vfork)
popl %ecx // Grab the return address.
.cfi_adjust_cfa_offset 4
.cfi_rel_offset ecx, 0
movl $__NR_vfork, %eax
int $0x80
cmpl $-MAX_ERRNO, %eax