diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-28 16:42:33 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-10-01 10:34:48 +0930 |
commit | 2dd7b93778d551b6981c8086ecb38e26f677bd2b (patch) | |
tree | 513fb58bfdd39b9e1778ce3e2f1ae7f5d92d7897 /gcc | |
parent | c6be439b37702f6ac4c2fc447c6f3ed1042b80a3 (diff) | |
download | gcc-2dd7b93778d551b6981c8086ecb38e26f677bd2b.zip gcc-2dd7b93778d551b6981c8086ecb38e26f677bd2b.tar.gz gcc-2dd7b93778d551b6981c8086ecb38e26f677bd2b.tar.bz2 |
[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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/ppc-asm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/config/rs6000/ppc-asm.h b/gcc/config/rs6000/ppc-asm.h index 48edc99..e0bce9c 100644 --- a/gcc/config/rs6000/ppc-asm.h +++ b/gcc/config/rs6000/ppc-asm.h @@ -262,6 +262,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #undef toc #define FUNC_NAME(name) GLUE(__USER_LABEL_PREFIX__,name) +#ifdef __PCREL__ +#define JUMP_TARGET(name) GLUE(FUNC_NAME(name),@notoc) +#define FUNC_START(name) \ + .type FUNC_NAME(name),@function; \ + .globl FUNC_NAME(name); \ +FUNC_NAME(name): \ + .localentry FUNC_NAME(name),1 +#else #define JUMP_TARGET(name) FUNC_NAME(name) #define FUNC_START(name) \ .type FUNC_NAME(name),@function; \ @@ -270,6 +278,7 @@ FUNC_NAME(name): \ 0: addis 2,12,(.TOC.-0b)@ha; \ addi 2,2,(.TOC.-0b)@l; \ .localentry FUNC_NAME(name),.-FUNC_NAME(name) +#endif /* !__PCREL__ */ #define HIDDEN_FUNC(name) \ FUNC_START(name) \ |