OSDN Git Service

xtensa: support call0 ABI
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 15 Sep 2015 22:49:49 +0000 (01:49 +0300)
committerWaldemar Brodkorb <wbx@openadk.org>
Fri, 9 Oct 2015 03:27:50 +0000 (05:27 +0200)
commit916e50b36acaf1bc26fc7bd0972ac48e2ad9e2bf
treeb0c2f4b0a783e133ca3f5b730a0d704e1899c8c9
parent4b936dfa7598811e02f93f167fa3df324275925c
xtensa: support call0 ABI

Most changes are mechanical replacement of 'retw' instruction with
'abi_ret' macro, defined to 'retw' or 'ret' according to ABI.
Assembly code that makes calls is duplicated for call0 ABI with changed
register numbers for parameters/return value and call instruction.
'entry' instructions are replaced with 'abi_entry' macro.

More interesting changes:
- non-leaf assembly functions (e.g. _dl_tlsdesc_dynamic,
  _dl_linux_resolve, SYSCALL_ERROR_HANDLER, PSEUDO) now need to preserve
  registers around intermediate calls they make, use temporary stack
  frame for that;
- setjmp/longjmp only need to save and restore return address, stack
  pointer and callee-saved registers in the jmpbuf;
- __clone and syscall functions had hardcoded offsets to parameter
  passed on stack, on call0 ABI they don't need stack frame, so the
  offset is different. Replace these offsets with FRAMESIZE macro.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
25 files changed:
ldso/ldso/xtensa/dl-startup.h
ldso/ldso/xtensa/dl-tlsdesc.S
ldso/ldso/xtensa/resolve.S
libc/string/xtensa/memcpy.S
libc/string/xtensa/memset.S
libc/string/xtensa/strcmp.S
libc/string/xtensa/strcpy.S
libc/string/xtensa/strlen.S
libc/string/xtensa/strncpy.S
libc/sysdeps/linux/xtensa/__longjmp.S
libc/sysdeps/linux/xtensa/bits/setjmp.h
libc/sysdeps/linux/xtensa/clone.S
libc/sysdeps/linux/xtensa/crt1.S
libc/sysdeps/linux/xtensa/crti.S
libc/sysdeps/linux/xtensa/crtn.S
libc/sysdeps/linux/xtensa/mmap.S
libc/sysdeps/linux/xtensa/setjmp.S
libc/sysdeps/linux/xtensa/syscall.S
libc/sysdeps/linux/xtensa/sysdep.h
libc/sysdeps/linux/xtensa/vfork.S
libc/sysdeps/linux/xtensa/windowspill.S
libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/sysdep-cancel.h
libpthread/nptl/sysdeps/xtensa/pthread_spin_lock.S
libpthread/nptl/sysdeps/xtensa/pthread_spin_trylock.S
test/tls/tls-macros.h