This commit is contained in:
QL 2018-10-29 15:25:43 -04:00
parent f126d97199
commit 4fdcaf3c46
2 changed files with 22 additions and 22 deletions

View File

@ -1,11 +1,11 @@
/*****************************************************************************
* Product: QK port to ARM7-9, GNU-ARM assembler
* Last Updated for Version: 5.8.2
* Date of the Last Update: 2017-01-05
* Last Updated for Version: 6.3.6
* Date of the Last Update: 2018-10-29
*
* Q u a n t u m L e a P s
* ---------------------------
* innovating embedded systems
* ------------------------
* Modern Embedded Software
*
* Copyright (C) Quantum Leaps, LLC. All rights reserved.
*
@ -28,7 +28,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Contact information:
* https://state-machine.com
* https://www.state-machine.com
* mailto:info@state-machine.com
*****************************************************************************/
@ -39,7 +39,7 @@
.equ SYS_MODE, 0x1F
/* NOTE: keep in synch with the QK_Attr struct in "qk.h" !!! */
.equ QK_INT_NEST, 16
.equ QK_INT_NEST, 4
.text
.arm
@ -114,9 +114,9 @@ QK_irq:
/* IRQ entry }}} */
LDR r0,=QK_attr_ /* load address in already saved r0 */
LDR r12,[r0,#QK_INT_NEST] /* load QK_attr_.intNest into saved r12 */
LDRB r12,[r0,#QK_INT_NEST] /* load QK_attr_.intNest into saved r12 */
ADD r12,r12,#1 /* increment the nesting level */
STR r12,[r0,#QK_INT_NEST] /* store the value in QK_attr_.intNest */
STRB r12,[r0,#QK_INT_NEST] /* store the value in QK_attr_.intNest */
/* MSR cpsr_c,#(SYS_MODE | NO_IRQ) ; enable FIQ
* NOTE: BSP_irq might re-enable IRQ interrupts (the FIQ is enabled
@ -128,9 +128,9 @@ QK_irq:
MSR cpsr_c,#(SYS_MODE | NO_IRQ) /* make sure IRQs are disabled */
LDR r0,=QK_attr_ /* load address */
LDR r12,[r0,#QK_INT_NEST] /* load QK_attr_.intNest into saved r12 */
LDRB r12,[r0,#QK_INT_NEST] /* load QK_attr_.intNest into saved r12 */
SUBS r12,r12,#1 /* decrement the nesting level */
STR r12,[r0,#QK_INT_NEST] /* store the value in QK_attr_.intNest */
STRB r12,[r0,#QK_INT_NEST] /* store the value in QK_attr_.intNest */
BNE QK_irq_exit /* branch if interrupt nesting not zero */
LDR r12,=QK_sched_

View File

@ -1,11 +1,11 @@
;-----------------------------------------------------------------------------
; Product: QK port to ARM7/9, IAR-ARM Assembler
; Last Updated for Version: 5.7.2
; Date of the Last Update: 2016-09-26
; Last Updated for Version: 6.3.6
; Date of the Last Update: 2018-10-29
;
; Q u a n t u m L e a P s
; ---------------------------
; innovating embedded systems
; ------------------------
; Modern Embedded Software
;
; Copyright (C) Quantum Leaps, LLC. All rights reserved.
;
@ -28,7 +28,7 @@
; along with this program. If not, see <http://www.gnu.org/licenses/>.
;
; Contact information:
; https://state-machine.com
; https://www.state-machine.com
; mailto:info@state-machine.com
;-----------------------------------------------------------------------------
@ -39,7 +39,7 @@ IRQ_MODE DEFINE 0x12
SYS_MODE DEFINE 0x1F
; NOTE: keep in synch with the QK_Attr struct in "qk.h" !!!
QK_INT_NEST DEFINE 16
QK_INT_NEST DEFINE 4
;-----------------------------------------------------------------------------
; Interrupt disabling/enabling and QK initialization
@ -94,9 +94,9 @@ QK_irq:
; IRQ entry }}}
LDR r0,=QK_attr_ ; load address in already saved r0
LDR r12,[r0,#QK_INT_NEST] ; load QK_attr_.intNest into saved r12
LDRB r12,[r0,#QK_INT_NEST] ; load QK_attr_.intNest into saved r12
ADD r12,r12,#1 ; increment the nesting level
STR r12,[r0,#QK_INT_NEST] ; store the value in QK_attr_.intNest
STRB r12,[r0,#QK_INT_NEST] ; store the value in QK_attr_.intNest
; MSR cpsr_c,#(SYS_MODE | NO_IRQ) ; enable FIQ
; NOTE: BSP_irq might re-enable IRQ interrupts (the FIQ is enabled
@ -109,9 +109,9 @@ QK_irq:
MSR cpsr_c,#(SYS_MODE | NO_IRQ) ; make sure IRQs are disabled
LDR r0,=QK_attr_ ; load address
LDR r12,[r0,#QK_INT_NEST] ; load QK_attr_.intNest into saved r12
LDRB r12,[r0,#QK_INT_NEST] ; load QK_attr_.intNest into saved r12
SUBS r12,r12,#1 ; decrement the nesting level
STR r12,[r0,#QK_INT_NEST] ; store the value in QK_attr_.intNest
STRB r12,[r0,#QK_INT_NEST] ; store the value in QK_attr_.intNest
BNE QK_irq_exit ; branch if interrupt nesting not zero
LDR r12,=QK_sched_