summaryrefslogtreecommitdiff
path: root/ldso/ldso/xtensa/dl-tlsdesc.S
AgeCommit message (Collapse)Author
2018-01-21xtensa: fix _dl_tlsdesc_dynamicMax Filippov
There are multiple errors in _dl_tlsdesc_dynamic: - the reference C implementation should return pointer to the thread-local variable, not offset from the thread pointer, because the xtensa ABI expects TLSDESC_FN to return pointer to the TLS variable; - addx8 used for indexing into dtv has its second and third registers in wrong order, the index must be multiplied by 8, not the base; - the same addx8 uses wrong base: instead of dtv it adds the offset to the threadptr; - the return value in the fast path is calculated as td->tlsinfo.ti_offset - __builtin_thread_pointer, not what was intended; - both fast and slow paths should not subtract __builtin_thread_pointer from the result. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-10-08xtensa: support call0 ABIMax Filippov
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>
2015-03-08okay, chicken-egg-problem solved really now. (was xtensa no thread failure)Waldemar Brodkorb
2015-03-07should have test it better, fix non-thread compileWaldemar Brodkorb
2015-03-07fix non-thread compile for xtensaWaldemar Brodkorb
2014-09-22xtensa: add support for NPTLWaldemar Brodkorb
Changes from: https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl Author: Chris Zankel <chris@zankel.net> Author: Baruch Siach <baruch@tkos.co.il>