From 4f8212c204b02fb6d825b9d9aeccf979b08c2188 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Thu, 13 Jun 2024 04:31:49 -0700 Subject: [PATCH] [compiler-rt][RISC-V] Save/Restore for E goes with ABI 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. --- compiler-rt/lib/builtins/riscv/restore.S | 4 ++-- compiler-rt/lib/builtins/riscv/save.S | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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,@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,@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,@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,@function