From 056f9d818eaf1dbe9e9d63b64b109fd9b608fa36 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Fri, 24 Aug 2018 23:11:59 +0000 Subject: rewrite __aeabi_read_tp in asm __aeabi_read_tp used to call c code, but that was incorrect as the arm runtime abi specifies special pcs for this function: it is only allowed to clobber r0, ip, lr and cpsr. maintainer's note: the old code explicitly saved and restored all general-purpose registers which are call-clobbered in the normal calling convention, so it's unlikely that any real-world compilers produced code that could break. however theoretically they could have chosen to use floating point registers, in which case the caller's values of those registers would be clobbered. --- src/thread/arm/__aeabi_read_tp_c.c | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 src/thread/arm/__aeabi_read_tp_c.c (limited to 'src/thread/arm/__aeabi_read_tp_c.c') diff --git a/src/thread/arm/__aeabi_read_tp_c.c b/src/thread/arm/__aeabi_read_tp_c.c deleted file mode 100644 index 0c56d613..00000000 --- a/src/thread/arm/__aeabi_read_tp_c.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "pthread_impl.h" -#include - -__attribute__((__visibility__("hidden"))) -void *__aeabi_read_tp_c(void) -{ - return TP_ADJ(__pthread_self()); -} -- cgit 1.4.1