riscv: Set mabi and march flags for floating point
Adds handling of the FLOAT_64BIT option when determining the ISA flags as well as introduces a new Kconfig option to enable/disable the hard-float calling convention. Signed-off-by: Corey Wharton <coreyw7@fb.com>
This commit is contained in:
parent
a4a334d3f7
commit
22c52846a5
2 changed files with 17 additions and 1 deletions
|
@ -13,6 +13,14 @@ config COMPRESSED_ISA
|
|||
bool
|
||||
default y if 64BIT
|
||||
|
||||
config FLOAT_HARD
|
||||
bool "Enable hard-float calling convention"
|
||||
default y
|
||||
depends on FLOAT
|
||||
select COMPRESSED_ISA
|
||||
help
|
||||
This option enables the hard-float calling convention.
|
||||
|
||||
menu "RISCV Processor Options"
|
||||
|
||||
config INCLUDE_RESET_VECTOR
|
||||
|
|
|
@ -12,7 +12,15 @@ else()
|
|||
string(CONCAT riscv_march ${riscv_march} "32ima")
|
||||
endif()
|
||||
|
||||
if(CONFIG_FLOAT)
|
||||
if(CONFIG_FLOAT_64BIT)
|
||||
if(CONFIG_FLOAT_HARD)
|
||||
string(CONCAT riscv_mabi ${riscv_mabi} "d")
|
||||
endif()
|
||||
string(CONCAT riscv_march ${riscv_march} "fd")
|
||||
elseif(CONFIG_FLOAT)
|
||||
if(CONFIG_FLOAT_HARD)
|
||||
string(CONCAT riscv_mabi ${riscv_mabi} "f")
|
||||
endif()
|
||||
string(CONCAT riscv_march ${riscv_march} "f")
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue