From ef42b7c31e95399a49cd8b58b55bfad5fba8a1ac Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Thu, 19 May 2022 12:41:19 +0300 Subject: [PATCH] risc-v/irq: Add ABI name versions of FPU registers --- arch/risc-v/include/irq.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/risc-v/include/irq.h b/arch/risc-v/include/irq.h index 34f49dc00c..9e2206acbf 100644 --- a/arch/risc-v/include/irq.h +++ b/arch/risc-v/include/irq.h @@ -458,6 +458,26 @@ #define REG_T5 REG_X30 #define REG_T6 REG_X31 +#ifdef CONFIG_ARCH_FPU +/* $0-$1 = fs0-fs1: Callee saved registers */ + +# define REG_FS0 REG_F8 +# define REG_FS1 REG_F9 + +/* $18-$27 = fs2-fs11: Callee saved registers */ + +# define REG_FS2 REG_F18 +# define REG_FS3 REG_F19 +# define REG_FS4 REG_F20 +# define REG_FS5 REG_F21 +# define REG_FS6 REG_F22 +# define REG_FS7 REG_F23 +# define REG_FS8 REG_F24 +# define REG_FS9 REG_F25 +# define REG_FS10 REG_F26 +# define REG_FS11 REG_F27 +#endif + /**************************************************************************** * Public Types ****************************************************************************/