Improve RISC-V support
Check __riscv_xlen == 64 rather than _LP64 and define _LP64 if missing. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Brooks Davis <brooks.davis@sri.com> Closes #14128
This commit is contained in:
parent
da3d266672
commit
5229071ba1
|
@ -206,9 +206,13 @@
|
|||
* RISC-V arch specific defines
|
||||
* only RV64G (including atomic) LP64 is supported yet
|
||||
*/
|
||||
#elif defined(__riscv) && defined(_LP64) && _LP64 && \
|
||||
#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 && \
|
||||
defined(__riscv_atomic) && __riscv_atomic
|
||||
|
||||
#if !defined(_LP64)
|
||||
#define _LP64 1
|
||||
#endif
|
||||
|
||||
#ifndef __riscv__
|
||||
#define __riscv__
|
||||
#endif
|
||||
|
|
|
@ -227,9 +227,13 @@ extern "C" {
|
|||
* RISC-V arch specific defines
|
||||
* only RV64G (including atomic) LP64 is supported yet
|
||||
*/
|
||||
#elif defined(__riscv) && defined(_LP64) && _LP64 && \
|
||||
#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 && \
|
||||
defined(__riscv_atomic) && __riscv_atomic
|
||||
|
||||
#if !defined(_LP64)
|
||||
#define _LP64 1
|
||||
#endif
|
||||
|
||||
#ifndef __riscv__
|
||||
#define __riscv__
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue