summaryrefslogtreecommitdiff
path: root/libc/string/xtensa/strcpy.S
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2015-09-16 01:49:49 +0300
committerWaldemar Brodkorb <wbx@openadk.org>2015-10-08 20:31:24 +0200
commite78a0f58f23347c822c182d1c01f6eb9b9866d60 (patch)
tree723cfbcd2411d889fb4956adb7f2d11a6d766050 /libc/string/xtensa/strcpy.S
parent9fae2ad9937279c9f7f40975ac14cb7b57f4a36d (diff)
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>
Diffstat (limited to 'libc/string/xtensa/strcpy.S')
-rw-r--r--libc/string/xtensa/strcpy.S12
1 files changed, 6 insertions, 6 deletions
diff --git a/libc/string/xtensa/strcpy.S b/libc/string/xtensa/strcpy.S
index f9f586896..9f42b34e6 100644
--- a/libc/string/xtensa/strcpy.S
+++ b/libc/string/xtensa/strcpy.S
@@ -68,7 +68,7 @@ ENTRY (strcpy)
s8i a8, a10, 1 /* store byte 0 */
addi a10, a10, 2 /* advance dst pointer */
bnez a8, .Lsrcaligned
-1: retw
+1: abi_ret
/* dst is word-aligned; src is word-aligned. */
@@ -102,21 +102,21 @@ ENTRY (strcpy)
#endif /* !XCHAL_HAVE_LOOPS */
.Lz3: /* Byte 3 is zero. */
- retw
+ abi_ret
.Lz0: /* Byte 0 is zero. */
#ifdef __XTENSA_EB__
movi a8, 0
#endif
s8i a8, a10, 0
- retw
+ abi_ret
.Lz1: /* Byte 1 is zero. */
#ifdef __XTENSA_EB__
extui a8, a8, 16, 16
#endif
s16i a8, a10, 0
- retw
+ abi_ret
.Lz2: /* Byte 2 is zero. */
#ifdef __XTENSA_EB__
@@ -125,7 +125,7 @@ ENTRY (strcpy)
s16i a8, a10, 0
movi a8, 0
s8i a8, a10, 2
- retw
+ abi_ret
.align 4
/* (2 mod 4) alignment for loop instruction */
@@ -144,6 +144,6 @@ ENTRY (strcpy)
#else
bnez a8, 1b
#endif
-2: retw
+2: abi_ret
libc_hidden_def (strcpy)