riscv: Use norvc over arch, -c
Subsystems (4)
PATCH 1/1 riscv: Use norvc over arch, -c
The Linux kernel main tree uses "norvc" over
"arch, -c" change to match this.
GCC 15 started to add _zca_zcd to the assembler flags causing a bug which made "arch, -c" generate a compressed instruction.
Cc Clément Léger <[email protected]>
Signed-off-by Jesse Taube <[email protected]>
--- riscv/isa-dbltrp.c | 2 +- riscv/sbi-dbtr.c | 2 +- riscv/sbi-fwft.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
riscv/isa-dbltrp.c +1 -1
@@ -26,7 +26,7 @@ do { \unsigned long value =0 ; \ asmvolatile ( \" .option push\n" \ -" .option arch,-c\n" \ +" .option norvc\n" \" sw %0, 0(%1)\n" \" .option pop\n" \ : :"r" (value),"r" (ptr) :"memory" ); \
riscv/sbi-dbtr.c +1 -1
@@ -134,7 +134,7 @@ static __attribute__((naked)) void exec_call(void) {/* skip over nop when triggered instead of ret. */ asmvolatile (".option push\n" -".option arch, -c\n" +".option norvc\n" "nop\n" "ret\n" ".option pop\n" );
riscv/sbi-fwft.c +1 -1
@@ -174,7 +174,7 @@ static void fwft_check_misaligned_exc_deleg(void)* Disable compression so the lw takes exactly 4 bytes and thus * can be skipped reliably from the exception handler. */ -".option arch,-c\n" +".option norvc\n" "lw %[val], 1(%[val_addr])\n" ".option pop\n" : [val] "+r" (ret.value)
Signature · 1 line
2.43.0
Quoted 62 lines · Jesse Taube
The Linux kernel main tree uses "norvc" over
"arch, -c" change to match this.GCC 15 started to add
_zca_zcdto the assembler flags causing a bug which made "arch, -c" generate a compressed instruction.Cc Clément Léger <[email protected]>Signed-off-by Jesse Taube <[email protected]>--- riscv/isa-dbltrp.c | 2 +- riscv/sbi-dbtr.c | 2 +- riscv/sbi-fwft.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)riscv/isa-dbltrp.c +1
-1@@ -26,7 +26,7 @@ do { \unsigned long value =0 ; \ asmvolatile ( \" .option push\n" \ -" .option arch,-c\n" \ +" .option norvc\n" \" sw %0, 0(%1)\n" \" .option pop\n" \ : :"r" (value),"r" (ptr) :"memory" ); \riscv/sbi-dbtr.c +1
-1@@ -134,7 +134,7 @@ static __attribute__((naked)) void exec_call(void) {/* skip over nop when triggered instead of ret. */ asmvolatile (".option push\n" -".option arch, -c\n" +".option norvc\n" "nop\n" "ret\n" ".option pop\n" );riscv/sbi-fwft.c +1
-1@@ -174,7 +174,7 @@ static void fwft_check_misaligned_exc_deleg(void)* Disable compression so the lw takes exactly 4 bytes and thus * can be skipped reliably from the exception handler. */ -".option arch,-c\n" +".option norvc\n" "lw %[val], 1(%[val_addr])\n" ".option pop\n" : [val] "+r" (ret.value)Signature · 7 lines
2.43.0 -- kvm-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kvm-riscv
Merged. Thanks