Skip to content

Commit 230ba03

Browse files
committed
Space optimization to fault handlers
1 parent 797538c commit 230ba03

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

cmsis/TARGET_CORTEX_M/TOOLCHAIN_ARM/except.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,9 @@ Fault_Handler_Continue2
148148
ADDS R1,#4
149149
MRS R2,CONTROL ; Get CONTROL Reg
150150
STR R2,[R1]
151-
LDR R3,=mbed_fault_handler ; Load address of mbedFaultHandler
152151
MOV R0,R12
153152
LDR R1,=mbed_fault_context
154-
BLX R3
153+
BL mbed_fault_handler
155154
#endif
156155
B . ; Just in case we come back here
157156
ENDP

cmsis/TARGET_CORTEX_M/TOOLCHAIN_GCC/except.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,9 @@ Fault_Handler_Continue2:
181181
ADDS R1,#4
182182
MRS R2,CONTROL // Get CONTROL Reg
183183
STR R2,[R1]
184-
LDR R3,=mbed_fault_handler // Load address of mbedFaultHandler
185184
MOV R0,R12
186185
LDR R1,=mbed_fault_context
187-
BLX R3
186+
BL mbed_fault_handler
188187
#endif
189188
B . // Just in case we come back here
190189

cmsis/TARGET_CORTEX_M/TOOLCHAIN_IAR/except.S

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,9 @@ Fault_Handler_Continue2
143143
ADDS R1,#4
144144
MRS R2,CONTROL ; Get CONTROL Reg
145145
STR R2,[R1]
146-
LDR R3,=mbed_fault_handler ; Load address of mbedFaultHandler
147146
MOV R0,R12
148147
LDR R1,=mbed_fault_context
149-
BLX R3
148+
BL mbed_fault_handler
150149
#endif
151150
B . ; Just in case we come back here
152151
#endif ; #if (MBED_FAULT_HANDLER_SUPPORT == 1)

0 commit comments

Comments
 (0)