File tree 1 file changed +16
-3
lines changed
1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 75
75
76
76
/ * Save the floating point context , if any. * /
77
77
FMRXNE R1 , FPSCR
78
+ PUSHNE {R1}
78
79
VPUSHNE {D0 - D15}
79
80
VPUSHNE {D16 - D31}
80
- PUSHNE {R1}
81
81
82
82
/ * Save ulPortTaskHasFPUContext itself. * /
83
83
PUSH {R3}
106
106
CMP R1 , # 0
107
107
108
108
/ * Restore the floating point context , if any. * /
109
- POPNE {R0}
110
109
VPOPNE {D16 - D31}
111
110
VPOPNE {D0 - D15}
111
+ POPNE {R0}
112
112
VMSRNE FPSCR , R0
113
113
114
114
/ * Restore the critical section nesting depth. * /
145
145
FreeRTOS_SWI_Handler:
146
146
/ * Save the context of the current task and select a new task to run. * /
147
147
portSAVE_CONTEXT
148
+
149
+ / * Ensure bit 2 of the stack pointer is clear. * /
150
+ MOV r2 , sp
151
+ AND r2 , r2 , # 4
152
+ SUB sp , sp , r2
153
+
148
154
LDR R0 , vTaskSwitchContextConst
149
155
BLX R0
156
+
150
157
portRESTORE_CONTEXT
151
158
152
159
@@ -256,7 +263,13 @@ switch_before_exit:
256
263
/ * Call the function th at selects the new task to execute.
257
264
vTaskSwitchContext() if vTaskSwitchContext() uses LDRD or STRD
258
265
instructions , or 8 byte aligned stack allocated data. LR does not need
259
- saving as a new LR will be loaded by portRESTORE_CONTEXT anyway. * /
266
+ saving as a new LR will be loaded by portRESTORE_CONTEXT anyway.
267
+ Ensure bit 2 of the stack pointer is clear. r2 holds the bit 2 value for
268
+ future use. * /
269
+ MOV r2 , sp
270
+ AND r2 , r2 , # 4
271
+ SUB sp , sp , r2
272
+
260
273
LDR R0 , vTaskSwitchContextConst
261
274
BLX R0
262
275
You can’t perform that action at this time.
0 commit comments