modify compiler with double float

This commit is contained in:
Wang_Weigen 2022-12-09 13:39:18 +08:00
parent 19b16f7729
commit 4f85bc91e5
7 changed files with 56 additions and 56 deletions

View File

@ -49,100 +49,100 @@
.macro ZERO_F_REGISTERS .macro ZERO_F_REGISTERS
fssr x31 fssr x31
fmv.w.x f0, x31 fmv.d.x f0, x31
FSubDS f0, f0, f0 FSubDS f0, f0, f0
fmv.w.x f1, x31 fmv.d.x f1, x31
FSubDS f1, f1, f1 FSubDS f1, f1, f1
fmv.w.x f2, x31 fmv.d.x f2, x31
FSubDS f2, f2, f2 FSubDS f2, f2, f2
fmv.w.x f3, x31 fmv.d.x f3, x31
FSubDS f3, f3, f3 FSubDS f3, f3, f3
fmv.w.x f4, x31 fmv.d.x f4, x31
FSubDS f4, f4, f4 FSubDS f4, f4, f4
fmv.w.x f5, x31 fmv.d.x f5, x31
FSubDS f5, f5, f5 FSubDS f5, f5, f5
fmv.w.x f6, x31 fmv.d.x f6, x31
FSubDS f6, f6, f6 FSubDS f6, f6, f6
fmv.w.x f7, x31 fmv.d.x f7, x31
FSubDS f7, f7, f7 FSubDS f7, f7, f7
fmv.w.x f8, x31 fmv.d.x f8, x31
FSubDS f8, f8, f8 FSubDS f8, f8, f8
fmv.w.x f9, x31 fmv.d.x f9, x31
FSubDS f9, f9, f9 FSubDS f9, f9, f9
fmv.w.x f10, x31 fmv.d.x f10, x31
FSubDS f10,f10,f10 FSubDS f10,f10,f10
fmv.w.x f11, x31 fmv.d.x f11, x31
FSubDS f11,f11,f11 FSubDS f11,f11,f11
fmv.w.x f12, x31 fmv.d.x f12, x31
FSubDS f12,f12,f12 FSubDS f12,f12,f12
fmv.w.x f13, x31 fmv.d.x f13, x31
FSubDS f13,f13,f13 FSubDS f13,f13,f13
fmv.w.x f14, x31 fmv.d.x f14, x31
FSubDS f14,f14,f14 FSubDS f14,f14,f14
fmv.w.x f15, x31 fmv.d.x f15, x31
FSubDS f15,f15,f15 FSubDS f15,f15,f15
fmv.w.x f16, x31 fmv.d.x f16, x31
FSubDS f16,f16,f16 FSubDS f16,f16,f16
fmv.w.x f17, x31 fmv.d.x f17, x31
FSubDS f17,f17,f17 FSubDS f17,f17,f17
fmv.w.x f18, x31 fmv.d.x f18, x31
FSubDS f18,f18,f18 FSubDS f18,f18,f18
fmv.w.x f19, x31 fmv.d.x f19, x31
FSubDS f19,f19,f19 FSubDS f19,f19,f19
fmv.w.x f20, x31 fmv.d.x f20, x31
FSubDS f20,f20,f20 FSubDS f20,f20,f20
fmv.w.x f21, x31 fmv.d.x f21, x31
FSubDS f21,f21,f21 FSubDS f21,f21,f21
fmv.w.x f22, x31 fmv.d.x f22, x31
FSubDS f22,f22,f22 FSubDS f22,f22,f22
fmv.w.x f23, x31 fmv.d.x f23, x31
FSubDS f23,f23,f23 FSubDS f23,f23,f23
fmv.w.x f24, x31 fmv.d.x f24, x31
FSubDS f24,f24,f24 FSubDS f24,f24,f24
fmv.w.x f25, x31 fmv.d.x f25, x31
FSubDS f25,f25,f25 FSubDS f25,f25,f25
fmv.w.x f26, x31 fmv.d.x f26, x31
FSubDS f26,f26,f26 FSubDS f26,f26,f26
fmv.w.x f27, x31 fmv.d.x f27, x31
FSubDS f27,f27,f27 FSubDS f27,f27,f27
fmv.w.x f28, x31 fmv.d.x f28, x31
FSubDS f28,f28,f28 FSubDS f28,f28,f28
fmv.w.x f29, x31 fmv.d.x f29, x31
FSubDS f29,f29,f29 FSubDS f29,f29,f29
fmv.w.x f30, x31 fmv.d.x f30, x31
FSubDS f30,f30,f30 FSubDS f30,f30,f30
fmv.w.x f31, x31 fmv.d.x f31, x31
FSubDS f31,f31,f31 FSubDS f31,f31,f31
.endm .endm

View File

@ -18,7 +18,7 @@
#ifdef ARCH_CPU_64BIT #ifdef ARCH_CPU_64BIT
#define StoreD sd #define StoreD sd
#define LoadD ld #define LoadD ld
#define FSubDS fsub.s #define FSubDS fsub.d
#define RegLength 8 #define RegLength 8
#define StoreDS "sd" #define StoreDS "sd"
#define LoadDS "ld" #define LoadDS "ld"

View File

@ -1,10 +1,10 @@
export CFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror
export AFLAGS := -c -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -x assembler-with-cpp -ggdb export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -nostartfiles -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror
export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed- export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed-
#export CROSS_COMPILE ?=/opt/xpack-riscv-none-embed-gcc-10.1.0-1.1/bin/riscv-none-embed- #export CROSS_COMPILE ?=/opt/xpack-riscv-none-embed-gcc-10.1.0-1.1/bin/riscv-none-embed-

View File

@ -1,6 +1,6 @@
export CFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror
export AFLAGS := -c -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -x assembler-with-cpp -ggdb export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -nostartfiles -Wl,--gc-sections,-Map=XiZi-edu-riscv64.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-edu-riscv64.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
ifeq ($(CONFIG_LIB_MUSLLIB), y) ifeq ($(CONFIG_LIB_MUSLLIB), y)
export LFLAGS += -nostdlib -nostdinc # -fno-builtin -nodefaultlibs export LFLAGS += -nostdlib -nostdinc # -fno-builtin -nodefaultlibs

View File

@ -1,10 +1,10 @@
export CFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline
# $(warning, "DEBUG, here add cflags.") # $(warning, "DEBUG, here add cflags.")
# export CFLAGS += -nostdlib -nostdinc -fno-builtin # export CFLAGS += -nostdlib -nostdinc -fno-builtin
export AFLAGS := -c -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -x assembler-with-cpp -ggdb export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -nostartfiles -Wl,--gc-sections,-Map=XiZi-kd233.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-kd233.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
ifeq ($(CONFIG_LIB_MUSLLIB), y) ifeq ($(CONFIG_LIB_MUSLLIB), y)
export LFLAGS += -nostdlib -nostdinc -fno-builtin -nodefaultlibs export LFLAGS += -nostdlib -nostdinc -fno-builtin -nodefaultlibs
@ -16,7 +16,7 @@ ifeq ($(CONFIG_RESOURCES_LWIP), y)
export LINK_LWIP := $(KERNEL_ROOT)/resources/ethernet/LwIP/liblwip.a export LINK_LWIP := $(KERNEL_ROOT)/resources/ethernet/LwIP/liblwip.a
endif endif
export CXXFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb
export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed- export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed-

View File

@ -1,10 +1,10 @@
export CFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror
export AFLAGS := -c -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -x assembler-with-cpp -ggdb export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -nostartfiles -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
export APPLFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror
export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed- export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed-

View File

@ -1,6 +1,6 @@
export CFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror
export AFLAGS := -c -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -x assembler-with-cpp -ggdb export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
export LFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -nostartfiles -Wl,--gc-sections,-Map=XiZi-xidatong-riscv64.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-xidatong-riscv64.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds
ifeq ($(CONFIG_LIB_MUSLLIB), y) ifeq ($(CONFIG_LIB_MUSLLIB), y)
export LFLAGS += -nostdlib -nostdinc # -fno-builtin -nodefaultlibs export LFLAGS += -nostdlib -nostdinc # -fno-builtin -nodefaultlibs
@ -12,9 +12,9 @@ ifeq ($(CONFIG_RESOURCES_LWIP), y)
export LINK_LWIP := $(KERNEL_ROOT)/resources/ethernet/LwIP/liblwip.a export LINK_LWIP := $(KERNEL_ROOT)/resources/ethernet/LwIP/liblwip.a
endif endif
export APPLFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -nostartfiles -Wl,--gc-sections,-Map=XiZi-xidatong-riscv64.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-xidatong-riscv64.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds
export CXXFLAGS := -mcmodel=medany -march=rv64imafc -mabi=lp64f -fsingle-precision-constant -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror
export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed- export CROSS_COMPILE ?=/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.1-20190425-1021/bin/riscv-none-embed-