1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/esp8266: same xtensa basics as ESP32

This commit is contained in:
Gunar Schorcht 2018-12-28 15:55:28 +01:00 committed by Schorcht
parent 75c0d06913
commit 2ac4d08b43

View File

@ -427,10 +427,14 @@ _frxt_dispatch:
#if XCHAL_CP_NUM > 0
/* Restore CPENABLE from task's co-processor save area. */
movi a3, pxCurrentTCB /* cp_state = */
l32i a3, a3, 0
l32i a2, a3, CP_TOPOFSTACK_OFFS /* StackType_t *pxStack; */
l16ui a3, a2, XT_CPENABLE /* CPENABLE = cp_state->cpenable; */
movi a3, pxCurrentTCB
l32i a3, a3, 0 /* a3 = pxCurrentTCB */
#ifdef RIOT_VERSION
addi a2, a3, -XT_CP_SIZE /* a2 = pxCurrentTCB->cp_state */
#else
l32i a2, a3, CP_TOPOFSTACK_OFFS /* StackType_t *pxStack; */
#endif
l16ui a3, a2, XT_CPENABLE /* CPENABLE = cpenable; */
wsr a3, CPENABLE
#endif
@ -522,7 +526,11 @@ vPortYield:
#if XCHAL_CP_NUM > 0
/* Clear CPENABLE, also in task's co-processor state save area. */
#ifdef RIOT_VERSION
addi a2, a2, -XT_CP_SIZE /* a2 = pxCurrentTCB->cp_state */
#else
l32i a2, a2, CP_TOPOFSTACK_OFFS /* a2 = pxCurrentTCB->cp_state */
#endif
movi a3, 0
wsr a3, CPENABLE
beqz a2, 1f
@ -563,9 +571,13 @@ vPortYieldFromInt:
#if XCHAL_CP_NUM > 0
/* Save CPENABLE in task's co-processor save area, and clear CPENABLE. */
movi a3, pxCurrentTCB /* cp_state = */
l32i a3, a3, 0
l32i a2, a3, CP_TOPOFSTACK_OFFS
movi a3, pxCurrentTCB
l32i a3, a3, 0 /* a3 = pxCurrentTCB */
#ifdef RIOT_VERSION
addi a2, a3, -XT_CP_SIZE /* a2 = pxCurrentTCB->cp_state */
#else
l32i a2, a3, CP_TOPOFSTACK_OFFS /* a2 = pxCurrentTCB->cp_state */
#endif
rsr a3, CPENABLE
s16i a3, a2, XT_CPENABLE /* cp_state->cpenable = CPENABLE; */
@ -611,7 +623,11 @@ _frxt_task_coproc_state:
movi a15, pxCurrentTCB
l32i a15, a15, 0 /* && pxCurrentTCB != 0) { */
beqz a15, 2f
#ifdef RIOT_VERSION
addi a15, a15, -XT_CP_SIZE /* a15 = pxCurrentTCB->cp_state */
#else
l32i a15, a15, CP_TOPOFSTACK_OFFS
#endif
ret
1: movi a15, 0