mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
arm/armv[7|8]m: compare of hardware fp registers should skip REG_FP_RESERVED
Fix fpu test break Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
committed by
Masayuki Ishikawa
parent
64e4c9ca02
commit
875c5dac75
@@ -53,7 +53,10 @@ bool up_fpucmp(const void *saveregs1, const void *saveregs2)
|
|||||||
const uint32_t *regs1 = saveregs1;
|
const uint32_t *regs1 = saveregs1;
|
||||||
const uint32_t *regs2 = saveregs2;
|
const uint32_t *regs2 = saveregs2;
|
||||||
|
|
||||||
return memcmp(®s1[REG_S0], ®s2[REG_S0], 4 * HW_FPU_REGS) == 0 &&
|
/* compare of hardware fp registers should skip REG_FP_RESERVED */
|
||||||
|
|
||||||
|
return memcmp(®s1[REG_S0], ®s2[REG_S0],
|
||||||
|
4 * (HW_FPU_REGS - 1)) == 0 &&
|
||||||
memcmp(®s1[REG_S16], ®s2[REG_S16], 4 * SW_FPU_REGS) == 0;
|
memcmp(®s1[REG_S16], ®s2[REG_S16], 4 * SW_FPU_REGS) == 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ARCH_FPU */
|
#endif /* CONFIG_ARCH_FPU */
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ void up_initial_state(struct tcb_s *tcb)
|
|||||||
|
|
||||||
#ifdef CONFIG_ARCH_FPU
|
#ifdef CONFIG_ARCH_FPU
|
||||||
xcp->regs[REG_FPSCR] = 0; /* REVISIT: Initial FPSCR should be configurable */
|
xcp->regs[REG_FPSCR] = 0; /* REVISIT: Initial FPSCR should be configurable */
|
||||||
xcp->regs[REG_FP_RESERVED] = 0;
|
|
||||||
#endif /* CONFIG_ARCH_FPU */
|
#endif /* CONFIG_ARCH_FPU */
|
||||||
|
|
||||||
/* Enable or disable interrupts, based on user configuration */
|
/* Enable or disable interrupts, based on user configuration */
|
||||||
|
|||||||
@@ -53,7 +53,10 @@ bool up_fpucmp(const void *saveregs1, const void *saveregs2)
|
|||||||
const uint32_t *regs1 = saveregs1;
|
const uint32_t *regs1 = saveregs1;
|
||||||
const uint32_t *regs2 = saveregs2;
|
const uint32_t *regs2 = saveregs2;
|
||||||
|
|
||||||
return memcmp(®s1[REG_S0], ®s2[REG_S0], 4 * HW_FPU_REGS) == 0 &&
|
/* compare of hardware fp registers should skip REG_FP_RESERVED */
|
||||||
|
|
||||||
|
return memcmp(®s1[REG_S0], ®s2[REG_S0],
|
||||||
|
4 * (HW_FPU_REGS - 1)) == 0 &&
|
||||||
memcmp(®s1[REG_S16], ®s2[REG_S16], 4 * SW_FPU_REGS) == 0;
|
memcmp(®s1[REG_S16], ®s2[REG_S16], 4 * SW_FPU_REGS) == 0;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_ARCH_FPU */
|
#endif /* CONFIG_ARCH_FPU */
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ void up_initial_state(struct tcb_s *tcb)
|
|||||||
|
|
||||||
#ifdef CONFIG_ARCH_FPU
|
#ifdef CONFIG_ARCH_FPU
|
||||||
xcp->regs[REG_FPSCR] |= ARMV8M_FPSCR_LTPSIZE_NONE;
|
xcp->regs[REG_FPSCR] |= ARMV8M_FPSCR_LTPSIZE_NONE;
|
||||||
xcp->regs[REG_FP_RESERVED] = 0;
|
|
||||||
#endif /* CONFIG_ARCH_FPU */
|
#endif /* CONFIG_ARCH_FPU */
|
||||||
|
|
||||||
/* Enable or disable interrupts, based on user configuration */
|
/* Enable or disable interrupts, based on user configuration */
|
||||||
|
|||||||
Reference in New Issue
Block a user