Small optimization.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14864 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
8db7a89fe6
commit
102016ca2e
|
@ -210,12 +210,12 @@ SVC_Handler:
|
||||||
|
|
||||||
/* Context load for new thread.*/
|
/* Context load for new thread.*/
|
||||||
adds r0, #CONTEXT_OFFSET
|
adds r0, #CONTEXT_OFFSET
|
||||||
PORT_LOAD_INTEGER_CONTEXT
|
|
||||||
|
|
||||||
#if CH_DBG_SYSTEM_STATE_CHECK || CH_DBG_STATISTICS
|
#if CH_DBG_SYSTEM_STATE_CHECK || CH_DBG_STATISTICS
|
||||||
|
ldr r3, [r0, #4] /* BASEPRI offset */
|
||||||
cmp r3, #CORTEX_BASEPRI_DISABLED
|
cmp r3, #CORTEX_BASEPRI_DISABLED
|
||||||
bne 1f
|
bne 1f
|
||||||
push {r0, lr}
|
mov r4, r0
|
||||||
/* Returning to a preempted thread, performing a logical
|
/* Returning to a preempted thread, performing a logical
|
||||||
"unlock" and handling statistics.*/
|
"unlock" and handling statistics.*/
|
||||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||||
|
@ -224,10 +224,11 @@ SVC_Handler:
|
||||||
#if CH_DBG_STATISTICS
|
#if CH_DBG_STATISTICS
|
||||||
bl __stats_stop_measure_crit_thd
|
bl __stats_stop_measure_crit_thd
|
||||||
#endif
|
#endif
|
||||||
pop {r0, lr}
|
mov r0, r4
|
||||||
1:
|
1:
|
||||||
#endif /* CH_DBG_SYSTEM_STATE_CHECK || CH_DBG_STATISTICS */
|
#endif /* CH_DBG_SYSTEM_STATE_CHECK || CH_DBG_STATISTICS */
|
||||||
|
|
||||||
|
PORT_LOAD_INTEGER_CONTEXT
|
||||||
PORT_LOAD_FLOAT_CONTEXT
|
PORT_LOAD_FLOAT_CONTEXT
|
||||||
PORT_LOAD_MPU_CONTEXT
|
PORT_LOAD_MPU_CONTEXT
|
||||||
|
|
||||||
|
@ -257,12 +258,12 @@ PendSV_Handler:
|
||||||
|
|
||||||
/* Context load for new thread.*/
|
/* Context load for new thread.*/
|
||||||
adds r0, #CONTEXT_OFFSET
|
adds r0, #CONTEXT_OFFSET
|
||||||
PORT_LOAD_INTEGER_CONTEXT
|
|
||||||
|
|
||||||
#if CH_DBG_SYSTEM_STATE_CHECK || CH_DBG_STATISTICS
|
#if CH_DBG_SYSTEM_STATE_CHECK || CH_DBG_STATISTICS
|
||||||
|
ldr r3, [r0, #4] /* BASEPRI offset */
|
||||||
cmp r3, #CORTEX_BASEPRI_DISABLED
|
cmp r3, #CORTEX_BASEPRI_DISABLED
|
||||||
bne 1f
|
bne 1f
|
||||||
push {r0, lr}
|
mov r4, r0
|
||||||
/* Returning to a preempted thread, performing a logical
|
/* Returning to a preempted thread, performing a logical
|
||||||
"unlock" and handling statistics.*/
|
"unlock" and handling statistics.*/
|
||||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||||
|
@ -271,10 +272,11 @@ PendSV_Handler:
|
||||||
#if CH_DBG_STATISTICS
|
#if CH_DBG_STATISTICS
|
||||||
bl __stats_stop_measure_crit_thd
|
bl __stats_stop_measure_crit_thd
|
||||||
#endif
|
#endif
|
||||||
pop {r0, lr}
|
mov r0, r4
|
||||||
1:
|
1:
|
||||||
#endif /* CH_DBG_SYSTEM_STATE_CHECK || CH_DBG_STATISTICS */
|
#endif /* CH_DBG_SYSTEM_STATE_CHECK || CH_DBG_STATISTICS */
|
||||||
|
|
||||||
|
PORT_LOAD_INTEGER_CONTEXT
|
||||||
PORT_LOAD_FLOAT_CONTEXT
|
PORT_LOAD_FLOAT_CONTEXT
|
||||||
PORT_LOAD_MPU_CONTEXT
|
PORT_LOAD_MPU_CONTEXT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue