mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 04:16:35 +08:00
arch/risc-v: Fix incompatible pointer types in vector context switching
The riscv_savevpu/restorevpu functions were using 'uintptr_t *' for vector registers, but 'tcb->xcp.vregs' is defined as 'uintreg_t *'. This mismatch caused compilation errors on GCC 13+ due to incompatible pointer types. This patch aligns the parameter types to 'uintreg_t *'. Signed-off-by: ENJOU1224 <enjou1224@outlook.com>
This commit is contained in:
@@ -243,12 +243,12 @@ static inline uintreg_t *riscv_fpuregs(struct tcb_s *tcb)
|
||||
|
||||
#ifdef CONFIG_ARCH_RV_ISA_V
|
||||
void riscv_vpuconfig(void);
|
||||
void riscv_savevpu(uintptr_t *regs, uintptr_t *vregs);
|
||||
void riscv_restorevpu(uintptr_t *regs, uintptr_t *vregs);
|
||||
void riscv_savevpu(uintreg_t *regs, uintreg_t *vregs);
|
||||
void riscv_restorevpu(uintreg_t *regs, uintreg_t *vregs);
|
||||
|
||||
/* Get VPU register save area */
|
||||
|
||||
static inline uintptr_t *riscv_vpuregs(struct tcb_s *tcb)
|
||||
static inline uintreg_t *riscv_vpuregs(struct tcb_s *tcb)
|
||||
{
|
||||
return tcb->xcp.vregs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user