repaire the k210 start failed problem caused by float sub operation at boot.S from Wang_weigen

it is OK
This commit is contained in:
xuedongliang 2022-12-09 14:22:19 +08:00
commit a3094c1dd6
2 changed files with 67 additions and 2 deletions

View File

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

View File

@ -1,4 +1,4 @@
export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -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
# $(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=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb
@ -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=rv64imafdc -mabi=lp64d -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
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-