From: Pavel Kozlov pavel.kozlov@synopsys.com
Hello,
The first patch allows to use general ARC TLS macro for ARCv3 and allows to build tests for ARCv3. The second patch contains fix for the TLS_GD macro.
This patch series is associated with uclibc-ng ARCv3 patches: Link: https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thr...
Pavel Kozlov (1): arc: fix TLS_GD macro, bad clobber list
Sergey Matyukevich (1): arc: use existing tls macros for ARCv3 32-bit CPUs
test/tls/tls-macros-arc.h | 14 ++++++-------- test/tls/tls-macros.h | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-)
base-commit: 728e1e0ea5adf1bd9b479e4edc456b637e26c031
From: Sergey Matyukevich sergey.matyukevich@synopsys.com
Signed-off-by: Sergey Matyukevich sergey.matyukevich@synopsys.com Signed-off-by: Pavel Kozlov pavel.kozlov@synopsys.com --- test/tls/tls-macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/tls/tls-macros.h b/test/tls/tls-macros.h index 087b365bcb43..a94c3d2f9793 100644 --- a/test/tls/tls-macros.h +++ b/test/tls/tls-macros.h @@ -24,7 +24,7 @@ #include <tls-macros-alpha.h> #endif
-#ifdef __arc__ +#if defined(__arc__) || defined(__ARC64_ARCH32__) #include <tls-macros-arc.h> #endif
From: Pavel Kozlov pavel.kozlov@synopsys.com
Move function call outside the inline asm code to simplify a clobber list.
The patch fixes tests tst-tls7 and tst-tls8 on ARCv3, they didn't pass because cc was not in clobber list and bad code was generated. The compiler didn't take in account changes of CPU Condition flags.
Signed-off-by: Pavel Kozlov pavel.kozlov@synopsys.com --- test/tls/tls-macros-arc.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/test/tls/tls-macros-arc.h b/test/tls/tls-macros-arc.h index 4b2d6f8ad90a..2f621d5a8783 100644 --- a/test/tls/tls-macros-arc.h +++ b/test/tls/tls-macros-arc.h @@ -2,14 +2,12 @@ #define TLS_LD(x) TLS_IE(x)
#define TLS_GD(x) \ - ({ int *__result; \ - __asm__ ("add r0, pcl, @" #x "@tlsgd \n" \ - ".tls_gd_ld " #x "`bl __tls_get_addr@plt \n" \ - "mov %0, r0 \n" \ - : "=&r" (__result) \ - ::"r0","r1","r2","r3","r4","r5","r6","r7", \ - "r8","r9","r10","r11","r12"); \ - __result; }) + ({ void *__result; \ + extern void *__tls_get_addr (void *); \ + __asm__ ("add %0, pcl, @" #x "@tlsgd \n" \ + ".tls_gd_ld " #x " \n" \ + : "=r" (__result)); \ + (int *)__tls_get_addr(__result); })
#define TLS_LE(x) \ ({ int *__result; \
Hi Pavel,
Thanks, applied and pushed, best regards Waldemar
Pavel.Kozlov@synopsys.com wrote,
From: Pavel Kozlov pavel.kozlov@synopsys.com
Hello,
The first patch allows to use general ARC TLS macro for ARCv3 and allows to build tests for ARCv3. The second patch contains fix for the TLS_GD macro.
This patch series is associated with uclibc-ng ARCv3 patches: Link: https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thr...
Pavel Kozlov (1): arc: fix TLS_GD macro, bad clobber list
Sergey Matyukevich (1): arc: use existing tls macros for ARCv3 32-bit CPUs
test/tls/tls-macros-arc.h | 14 ++++++-------- test/tls/tls-macros.h | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-)
base-commit: 728e1e0ea5adf1bd9b479e4edc456b637e26c031
2.25.1
devel mailing list -- devel@uclibc-ng.org To unsubscribe send an email to devel-leave@uclibc-ng.org