Skip to content

Commit 574e795

Browse files
author
Richard Earnshaw
committed
arm: add erratum mitigation to __gnu_cmse_nonsecure_call [PR102035]
Add the recommended erratum mitigation sequence to __gnu_cmse_nonsecure_call for use on Armv8-m.main devices. Since this is in the library code we cannot know in advance whether the core we are running on will be affected by this, so always enable it. libgcc: PR target/102035 * config/arm/cmse_nonsecure_call.S (__gnu_cmse_nonsecure_call): Add vlldm erratum work-around.
1 parent 3929bca commit 574e795

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libgcc/config/arm/cmse_nonsecure_call.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ blxns r4
102102
#ifdef __ARM_PCS_VFP
103103
vpop.f64 {d8-d15}
104104
#else
105+
/* VLLDM erratum mitigation sequence. */
106+
mrs r5, control
107+
tst r5, #8 /* CONTROL_S.SFPA */
108+
it ne
109+
.inst.w 0xeeb00a40 /* vmovne s0, s0 */
105110
vlldm sp /* Lazy restore of d0-d16 and FPSCR. */
106111
add sp, sp, #0x88 /* Free space used to save floating point registers. */
107112
#endif /* __ARM_PCS_VFP */

0 commit comments

Comments
 (0)