From 2dd7b93778d551b6981c8086ecb38e26f677bd2b Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 28 Sep 2020 16:42:33 +0930 Subject: [RS6000] Adjust gcc asm for power10 Generate assembly with .localentry,1 functions using @notoc calls. This patch makes libgcc.a asm look the same as power10 pcrel as far as toc/notoc is concerned. Otherwise calling between functions that advertise as using the TOC and those that don't, will require linker call stubs in statically linked code. gcc/ * config/rs6000/ppc-asm.h: Support __PCREL__ code. libgcc/ * config/rs6000/morestack.S, * config/rs6000/tramp.S: Support __PCREL__ code. libitm/ * config/powerpc/sjlj.S: Support __PCREL__ code. --- libitm/config/powerpc/sjlj.S | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libitm') diff --git a/libitm/config/powerpc/sjlj.S b/libitm/config/powerpc/sjlj.S index a963fc3..bcb0e73 100644 --- a/libitm/config/powerpc/sjlj.S +++ b/libitm/config/powerpc/sjlj.S @@ -26,7 +26,23 @@ #include "asmcfi.h" -#if defined(__powerpc64__) && _CALL_ELF == 2 +#if defined(__powerpc64__) && _CALL_ELF == 2 && defined(__PCREL__) +.macro FUNC name + .globl \name + .type \name, @function +\name: + .localentry \name, 1 +.endm +.macro END name + .size \name, . - \name +.endm +.macro HIDDEN name + .hidden \name +.endm +.macro CALL name + bl \name @notoc +.endm +#elif defined(__powerpc64__) && _CALL_ELF == 2 .macro FUNC name .globl \name .type \name, @function -- cgit v1.1