* [Buildroot] [PATCH 1/1] arch/riscv: set the default float ABI based on ISA extensions
@ 2019-09-19 15:40 Mark Corbin
2019-09-19 19:51 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Mark Corbin @ 2019-09-19 15:40 UTC (permalink / raw)
To: buildroot
This patch sets the default floating point ABI based on the ISA
extensions that have been selected rather than defaulting to soft
float.
For 64-bit:
ISA 'D' selects lp64d
ISA 'F' selects lp64f
Otherwise select lp64
For 32-bit:
ISA 'D' selects ilp32d
ISA 'F' selects ilp32f
Otherwise select ilp32
This change was proposed by Palmer Dabbelt at SiFive.
Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
---
arch/Config.in.riscv | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/Config.in.riscv b/arch/Config.in.riscv
index bdd2672602..1fc20e5de7 100644
--- a/arch/Config.in.riscv
+++ b/arch/Config.in.riscv
@@ -80,8 +80,12 @@ endchoice
choice
prompt "Target ABI"
- default BR2_RISCV_ABI_ILP32 if !BR2_ARCH_IS_64
- default BR2_RISCV_ABI_LP64 if BR2_ARCH_IS_64
+ default BR2_RISCV_ABI_ILP32D if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
+ default BR2_RISCV_ABI_ILP32F if !BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
+ default BR2_RISCV_ABI_ILP32 if !BR2_ARCH_IS_64
+ default BR2_RISCV_ABI_LP64D if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD
+ default BR2_RISCV_ABI_LP64F if BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF
+ default BR2_RISCV_ABI_LP64 if BR2_ARCH_IS_64
config BR2_RISCV_ABI_ILP32
bool "ilp32"
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] arch/riscv: set the default float ABI based on ISA extensions
2019-09-19 15:40 [Buildroot] [PATCH 1/1] arch/riscv: set the default float ABI based on ISA extensions Mark Corbin
@ 2019-09-19 19:51 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-09-19 19:51 UTC (permalink / raw)
To: buildroot
Hello Mark,
On Thu, 19 Sep 2019 16:40:35 +0100
Mark Corbin <mark.corbin@embecosm.com> wrote:
> This patch sets the default floating point ABI based on the ISA
> extensions that have been selected rather than defaulting to soft
> float.
>
> For 64-bit:
>
> ISA 'D' selects lp64d
> ISA 'F' selects lp64f
> Otherwise select lp64
>
> For 32-bit:
>
> ISA 'D' selects ilp32d
> ISA 'F' selects ilp32f
> Otherwise select ilp32
>
> This change was proposed by Palmer Dabbelt at SiFive.
>
> Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
> Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
> ---
> arch/Config.in.riscv | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Applied to master, thanks. However, I'm wondering: does it really makes
sense to offer a choice of the ABI ? Would there be a reason for a user
to use lp64 if he has the D ISA for example ? It would seem logical to
simply use lp64d as soon as you have the D ISA.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-19 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-19 15:40 [Buildroot] [PATCH 1/1] arch/riscv: set the default float ABI based on ISA extensions Mark Corbin
2019-09-19 19:51 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox