Jessica Clarke
|
00dfd4f870
|
Revert "[RISCV] Remove -riscv-no-aliases in favour of new -M no-aliases"
The replacement doesn't work for llc, but it is needed by
patchable-function-entry.ll.
This reverts commit aa9a30b83a .
|
2021-05-29 15:11:37 +01:00 |
Jessica Clarke
|
aa9a30b83a
|
[RISCV] Remove -riscv-no-aliases in favour of new -M no-aliases
Whilst here, also remove a couple of unnecessary -o - instances.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D103201
|
2021-05-29 14:58:28 +01: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 |