o Add support for long double.
o Add support for latest RISC-V GNU toolchain. Sponsored by: DARPA, AFRL Sponsored by: HEIF5
This commit is contained in:
parent
e8e5471317
commit
639bce9b04
@ -123,8 +123,11 @@ SRCF+= udivti3
|
||||
SRCF+= umoddi3
|
||||
SRCF+= umodti3
|
||||
|
||||
# 128-bit quad precision long double support, only used on arm64
|
||||
.if ${MACHINE_CPUARCH} == "aarch64"
|
||||
#
|
||||
# 128-bit quad precision long double support,
|
||||
# only used on arm64 and riscv.
|
||||
#
|
||||
.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv"
|
||||
SRCF+= addtf3
|
||||
SRCF+= comparetf2
|
||||
SRCF+= divtf3
|
||||
|
@ -1,6 +1,3 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# RISCVTODO: should be 113
|
||||
# compilation problems: gcc generates bltuz instruction, which is not exists
|
||||
|
||||
LDBL_PREC = 53
|
||||
LDBL_PREC = 113
|
||||
|
@ -66,7 +66,7 @@ On all supported architectures,
|
||||
.It mips64hf Ta 8 Ta 8
|
||||
.It powerpc Ta 4 Ta 8
|
||||
.It powerpc64 Ta 8 Ta 8
|
||||
.It riscv Ta 8 Ta
|
||||
.It riscv Ta 8 Ta 16
|
||||
.It sparc64 Ta 8 Ta 16
|
||||
.El
|
||||
.Ss Endianness and Char Signedness
|
||||
|
@ -156,7 +156,7 @@ _CPUCFLAGS = -march=${CPUTYPE}
|
||||
_CPUCFLAGS = -march=${CPUTYPE:S/^mips//}
|
||||
. endif
|
||||
. elif ${MACHINE_CPUARCH} == "riscv"
|
||||
_CPUCFLAGS = -msoft-float # -march="RV64I" # RISCVTODO
|
||||
_CPUCFLAGS = -mno-float -march="IMAFD"
|
||||
. elif ${MACHINE_ARCH} == "sparc64"
|
||||
. if ${CPUTYPE} == "v9"
|
||||
_CPUCFLAGS = -mcpu=v9
|
||||
@ -337,8 +337,8 @@ CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "riscv"
|
||||
CFLAGS += -msoft-float
|
||||
ACFLAGS += -msoft-float
|
||||
CFLAGS += -mno-float
|
||||
ACFLAGS += -mno-float
|
||||
.endif
|
||||
|
||||
# NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk
|
||||
|
@ -5,7 +5,12 @@
|
||||
#
|
||||
|
||||
CFLAGS+= -ffreestanding -Wformat
|
||||
CFLAGS+= ${CFLAGS_NO_SIMD} -msoft-float -D_STANDALONE
|
||||
CFLAGS+= ${CFLAGS_NO_SIMD} -D_STANDALONE
|
||||
.if ${MACHINE_CPUARCH} == "riscv"
|
||||
CFLAGS+= -mno-float
|
||||
.else
|
||||
CFLAGS+= -msoft-float
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "i386"
|
||||
CFLAGS.gcc+= -mpreferred-stack-boundary=2
|
||||
|
@ -60,7 +60,7 @@ assym.o: assym.s
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "riscv"
|
||||
assym.o: assym.s
|
||||
${AS} -msoft-float -o assym.o assym.s
|
||||
${AS} -mfloat-abi=soft -o assym.o assym.s
|
||||
.endif
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
@ -47,7 +47,7 @@
|
||||
#define _C_LABEL(x) x
|
||||
|
||||
#define ENTRY(sym) \
|
||||
.text; .globl sym; .type sym,@function; .align 2; sym:
|
||||
.text; .globl sym; .type sym,@function; .align 4; sym:
|
||||
#define END(sym) .size sym, . - sym
|
||||
|
||||
#define EENTRY(sym) \
|
||||
|
@ -76,22 +76,6 @@ __END_DECLS
|
||||
#define DBL_HAS_SUBNORM 1
|
||||
#endif /* __ISO_C_VISIBLE >= 2011 */
|
||||
|
||||
#define LDBL_MANT_DIG DBL_MANT_DIG
|
||||
#define LDBL_EPSILON ((long double)DBL_EPSILON)
|
||||
#define LDBL_DIG DBL_DIG
|
||||
#define LDBL_MIN_EXP DBL_MIN_EXP
|
||||
#define LDBL_MIN ((long double)DBL_MIN)
|
||||
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
||||
#define LDBL_MAX_EXP DBL_MAX_EXP
|
||||
#define LDBL_MAX ((long double)DBL_MAX)
|
||||
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
|
||||
#if __ISO_C_VISIBLE >= 2011
|
||||
#define LDBL_TRUE_MIN ((long double)DBL_TRUE_MIN)
|
||||
#define LDBL_DECIMAL_DIG DBL_DECIMAL_DIG
|
||||
#define LDBL_HAS_SUBNORM DBL_HAS_SUBNORM
|
||||
#endif /* __ISO_C_VISIBLE >= 2011 */
|
||||
|
||||
#if 0 /* RISCVTODO */
|
||||
#define LDBL_MANT_DIG 113
|
||||
#define LDBL_EPSILON 1.925929944387235853055977942584927319E-34L
|
||||
#define LDBL_DIG 33
|
||||
@ -106,6 +90,5 @@ __END_DECLS
|
||||
#define LDBL_DECIMAL_DIG 36
|
||||
#define LDBL_HAS_SUBNORM 1
|
||||
#endif /* __ISO_C_VISIBLE >= 2011 */
|
||||
#endif
|
||||
|
||||
#endif /* _MACHINE_FLOAT_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user