diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-04-08 05:17:50 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-04-20 05:54:24 +0300 |
commit | 4e991e3c16a350d1eeffc100ce3fb25292596d03 (patch) | |
tree | 850fa79b5e450ca0bbb807c42a50cfd54d01f70e /tools/testing/selftests/powerpc | |
parent | dc5dac748af9087e9240bd2ae6ae7db48d5360ae (diff) | |
download | linux-4e991e3c16a350d1eeffc100ce3fb25292596d03.tar.xz |
powerpc: add CFUNC assembly label annotation
This macro is to be used in assembly where C functions are called.
pcrel addressing mode requires branches to functions with a
localentry value of 1 to have either a trailing nop or @notoc.
This macro permits the latter without changing callers.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Add dummy definitions to fix selftests build]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230408021752.862660-5-npiggin@gmail.com
Diffstat (limited to 'tools/testing/selftests/powerpc')
-rw-r--r-- | tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h | 1 | ||||
-rw-r--r-- | tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h b/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h index 003e1b3d9300..a89f1fbf86ec 100644 --- a/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h +++ b/tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h @@ -27,6 +27,7 @@ #define _GLOBAL_TOC(A) _GLOBAL(A) #define _GLOBAL_TOC_KASAN(A) _GLOBAL(A) #define _GLOBAL_KASAN(A) _GLOBAL(A) +#define CFUNC(name) name #define PPC_MTOCRF(A, B) mtocrf A, B diff --git a/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h b/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h index 2b488b78c4f2..e713b69d694a 100644 --- a/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h +++ b/tools/testing/selftests/powerpc/stringloops/asm/ppc_asm.h @@ -9,6 +9,7 @@ #define _GLOBAL(A) FUNC_START(test_ ## A) #define _GLOBAL_TOC(A) FUNC_START(test_ ## A) +#define CFUNC(name) name #define CONFIG_ALTIVEC |