Chen Zheng
43213002b9
[PowerPC] Support -fpatchable-function-entry ( #92997 )
...
For now only PPC big endian Linux 32 and 64 bit are supported.
PPC little endian Linux has XRAY support for 64-bit.
PPC AIX has different patchable function entry implementations.
Fixes #63220
Fixes #57031
2024-07-22 08:51:51 +08:00
Fangrui Song
ddee8eff9c
[Driver][test] Replace legacy -target with --target=
...
Similar to previous cleanup.
2024-05-23 17:28:34 -07:00
WANG Xuerui
db5dfec9d4
[Clang][LoongArch] Implement patchable function entry
...
Similar to D98610 for RISCV.
This is going to be required by the upcoming Linux/LoongArch
[[ https://git.kernel.org/linus/4733f09d88074 | support for dynamic ftrace ]].
Reviewed By: SixWeining, MaskRay
Differential Revision: https://reviews.llvm.org/D141785
2023-03-16 09:33:58 +08:00
Fangrui Song
6ab8927931
[RISCV] Support clang -fpatchable-function-entry && GNU function attribute 'patchable_function_entry'
...
Similar to D72215 (AArch64) and D72220 (x86).
```
% clang -target riscv32 -march=rv64g -c -fpatchable-function-entry=2 a.c && llvm-objdump -dr a.o
...
0000000000000000 <main>:
0: 13 00 00 00 nop
4: 13 00 00 00 nop
% clang -target riscv32 -march=rv64gc -c -fpatchable-function-entry=2 a.c && llvm-objdump -dr a.o
...
00000002 <main>:
2: 01 00 nop
4: 01 00 nop
```
Recently the mainline kernel started to use -fpatchable-function-entry=8 for riscv (https://git.kernel.org/linus/afc76b8b80112189b6f11e67e19cf58301944814 ).
Differential Revision: https://reviews.llvm.org/D98610
2021-03-16 10:02:35 -07:00
Fangrui Song
69bf40c45f
[Driver][CodeGen] Support -fpatchable-function-entry=N,M and __attribute__((patchable_function_entry(N,M))) where M>0
...
Reviewed By: nickdesaulniers
Differential Revision: https://reviews.llvm.org/D73072
2020-01-23 17:02:54 -08:00
Fangrui Song
f17ae668a9
[Driver][CodeGen] Add -fpatchable-function-entry=N[,0]
...
In the backend, this feature is implemented with the function attribute
"patchable-function-entry". Both the attribute and XRay use
TargetOpcode::PATCHABLE_FUNCTION_ENTER, so the two features are
incompatible.
Reviewed By: ostannard, MaskRay
Differential Revision: https://reviews.llvm.org/D72222
2020-01-10 09:57:39 -08:00