[compiler-rt] eb97739 - [compiler-rt][RISC-V] Save/Restore for E goes with ABI (#95390)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 05:00:57 PDT 2024


Author: Sam Elliott
Date: 2024-07-11T13:00:53+01:00
New Revision: eb977399de30a166e3b1db905950c913fe36730b

URL: https://github.com/llvm/llvm-project/commit/eb977399de30a166e3b1db905950c913fe36730b
DIFF: https://github.com/llvm/llvm-project/commit/eb977399de30a166e3b1db905950c913fe36730b.diff

LOG: [compiler-rt][RISC-V] Save/Restore for E goes with ABI (#95390)

When compiling for the ILP32E/LP64E ABIs, even on a RISC-V machine with
`i`, we should be using the ILP32E/LP64E save/restore routines, so use
the right preprocessor macro.

Added: 
    

Modified: 
    compiler-rt/lib/builtins/riscv/restore.S
    compiler-rt/lib/builtins/riscv/save.S

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/builtins/riscv/restore.S b/compiler-rt/lib/builtins/riscv/restore.S
index 6f43842c8ca68..d87dfc1ac71dd 100644
--- a/compiler-rt/lib/builtins/riscv/restore.S
+++ b/compiler-rt/lib/builtins/riscv/restore.S
@@ -22,7 +22,7 @@
 
 #if __riscv_xlen == 32
 
-#ifndef __riscv_32e
+#ifndef __riscv_abi_rve
 
   .globl  __riscv_restore_12
   .type   __riscv_restore_12, at function
@@ -109,7 +109,7 @@ __riscv_restore_0:
 
 #elif __riscv_xlen == 64
 
-#ifndef __riscv_64e
+#ifndef __riscv_abi_rve
 
   .globl  __riscv_restore_12
   .type   __riscv_restore_12, at function

diff  --git a/compiler-rt/lib/builtins/riscv/save.S b/compiler-rt/lib/builtins/riscv/save.S
index 3e044179ff7f1..6324e05e97195 100644
--- a/compiler-rt/lib/builtins/riscv/save.S
+++ b/compiler-rt/lib/builtins/riscv/save.S
@@ -18,7 +18,7 @@
 
 #if __riscv_xlen == 32
 
-#ifndef __riscv_32e
+#ifndef __riscv_abi_rve
 
   .globl  __riscv_save_12
   .type   __riscv_save_12, at function
@@ -115,7 +115,7 @@ __riscv_save_0:
 
 #elif __riscv_xlen == 64
 
-#ifndef __riscv_64e
+#ifndef __riscv_abi_rve
 
   .globl  __riscv_save_12
   .type   __riscv_save_12, at function


        


More information about the llvm-commits mailing list