Skip to content

Commit e072356

Browse files
ENJOU1224acassis
authored andcommitted
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>
1 parent 76903ea commit e072356

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/risc-v/src/common/riscv_internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ static inline uintreg_t *riscv_fpuregs(struct tcb_s *tcb)
243243

244244
#ifdef CONFIG_ARCH_RV_ISA_V
245245
void riscv_vpuconfig(void);
246-
void riscv_savevpu(uintptr_t *regs, uintptr_t *vregs);
247-
void riscv_restorevpu(uintptr_t *regs, uintptr_t *vregs);
246+
void riscv_savevpu(uintreg_t *regs, uintreg_t *vregs);
247+
void riscv_restorevpu(uintreg_t *regs, uintreg_t *vregs);
248248

249249
/* Get VPU register save area */
250250

251-
static inline uintptr_t *riscv_vpuregs(struct tcb_s *tcb)
251+
static inline uintreg_t *riscv_vpuregs(struct tcb_s *tcb)
252252
{
253253
return tcb->xcp.vregs;
254254
}

0 commit comments

Comments
 (0)