[libcpu][riscv] 添加宏用于区别是否开启FPU,更新ch32v208v-r0 ->ch32v208w-r0,更新注释
@ -14,6 +14,7 @@ config SOC_RISCV_SERIES_CH32V2
|
|||||||
config SOC_RISCV_SERIES_CH32V3
|
config SOC_RISCV_SERIES_CH32V3
|
||||||
bool
|
bool
|
||||||
select ARCH_RISCV
|
select ARCH_RISCV
|
||||||
|
select ARCH_RISCV_FPU
|
||||||
select SOC_RISCV_FAMILY_CH32
|
select SOC_RISCV_FAMILY_CH32
|
||||||
|
|
||||||
config SOC_FAMILY_CH56X
|
config SOC_FAMILY_CH56X
|
||||||
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
@ -6,6 +6,7 @@
|
|||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2021-09-09 WCH the first version
|
* 2021-09-09 WCH the first version
|
||||||
|
* 2022-12-27 WangShun Merge WCH series mcu port files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cpuport.h"
|
#include "cpuport.h"
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2021-09-09 WCH the first version
|
* 2021-09-09 WCH the first version
|
||||||
|
* 2022-12-27 WangShun Merge WCH series mcu port files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2021-09-09 WCH the first version
|
* 2021-09-09 WCH the first version
|
||||||
|
* 2022-12-27 WangShun Merge WCH series mcu port files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cpuport.h"
|
#include "cpuport.h"
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
* 2018/10/28 Bernard The unify RISC-V porting implementation
|
* 2018/10/28 Bernard The unify RISC-V porting implementation
|
||||||
* 2018/12/27 Jesven Add SMP support
|
* 2018/12/27 Jesven Add SMP support
|
||||||
* 2020/11/20 BalanceTWK Add FPU support
|
* 2020/11/20 BalanceTWK Add FPU support
|
||||||
|
* 2022/12/28 WangShun Add macro to distinguish whether FPU is supported
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define __ASSEMBLY__
|
#define __ASSEMBLY__
|
||||||
@ -212,8 +213,11 @@ rt_hw_context_switch_exit:
|
|||||||
csrw mepc, a0
|
csrw mepc, a0
|
||||||
|
|
||||||
LOAD x1, 1 * REGBYTES(sp)
|
LOAD x1, 1 * REGBYTES(sp)
|
||||||
|
#ifdef ARCH_RISCV_FPU
|
||||||
li t0, 0x00007800
|
li t0, 0x00007800
|
||||||
|
#else
|
||||||
|
li t0, 0x00001800
|
||||||
|
#endif
|
||||||
csrw mstatus, t0
|
csrw mstatus, t0
|
||||||
LOAD a0, 2 * REGBYTES(sp)
|
LOAD a0, 2 * REGBYTES(sp)
|
||||||
csrs mstatus, a0
|
csrs mstatus, a0
|
||||||
|