PIC32MX/MZ: Fix error in assember macro. Noted by Tilak Tangudu

This commit is contained in:
Gregory Nutt 2016-01-05 10:04:12 -06:00
parent a063be5802
commit fe94318bb4
4 changed files with 20 additions and 20 deletions

View File

@ -72,7 +72,7 @@
* my_exception:
* EXCPT_PROLOGUE t0 - Save registers on stack, enable nested interrupts
* move a0, sp - Pass register save structure as the parameter 1
* USE_INTSTACK t0, t1, t2 - Switch to the interrupt stack
* USE_INTSTACK t0, t1, t2, t3 - Switch to the interrupt stack
* jal handler - Handle the exception IN=old regs OUT=new regs
* di - Disable interrupts
* RESTORE_STACK t0, t1 - Undo the operations of USE_STACK
@ -368,7 +368,7 @@
*
* On Entry:
* sp - Current value of the user stack pointer
* tmp1, tmp2, and tmp3 are registers that can be used temporarily.
* tmp1, tmp2, tmp3, and tmp4 are registers that can be used temporarily.
* All interrupts should still be disabled.
*
* At completion:
@ -378,7 +378,7 @@
*
********************************************************************************************/
.macro USE_INTSTACK, tmp1, tmp2, tmp3
.macro USE_INTSTACK, tmp1, tmp2, tmp3, tmp4
#if CONFIG_ARCH_INTERRUPTSTACK > 3
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
@ -398,9 +398,9 @@
*/
la \tmp3, g_intstackbase
lw \tmp, (\tmp3)
sw sp, (\tmp3)
move sp, \tmp3
lw \tmp4, (\tmp3)
sw sp, (\tmp4)
move sp, \tmp4
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
1:

View File

@ -490,8 +490,8 @@ __start:
_exception_handler:
EXCPT_PROLOGUE t0 /* Save registers on stack, enable nested interrupts */
move a0, sp /* Pass register save structure as the parameter 1 */
USE_INTSTACK t0, t1, t2 /* Switch to the interrupt stack */
la t0, pic32mx_exception /* Call pic32mx_exception(regs) */
USE_INTSTACK t0, t1, t2, t3 /* Switch to the interrupt stack */
la t0, pic32mx_exception /* Call pic32mx_exception(regs) */
jalr ra, t0
nop
#ifdef CONFIG_PIC32MX_NESTED_INTERRUPTS
@ -515,7 +515,7 @@ _exception_handler:
_int_handler:
EXCPT_PROLOGUE t0 /* Save registers on stack, enable nested interrupts */
move a0, sp /* Pass register save structure as the parameter 1 */
USE_INTSTACK t0, t1, t2 /* Switch to the interrupt stack */
USE_INTSTACK t0, t1, t2, t3 /* Switch to the interrupt stack */
la t0, pic32mx_decodeirq /* Call pic32mx_decodeirq(regs) */
jalr ra, t0
nop
@ -541,7 +541,7 @@ _int_handler:
_nmi_handler:
EXCPT_PROLOGUE t0 /* Save registers on stack, enable nested interrupts */
move a0, sp /* Pass register save structure as the parameter 1 */
USE_INTSTACK t0, t1, t2 /* Switch to the interrupt stack */
USE_INTSTACK t0, t1, t2, t3 /* Switch to the interrupt stack */
la t0, pic32mx_donmi /* Call up_donmi(regs) */
jalr ra, t0
nop

View File

@ -72,7 +72,7 @@
* my_exception:
* EXCPT_PROLOGUE t0 - Save registers on stack, enable nested interrupts
* move a0, sp - Pass register save structure as the parameter 1
* USE_INTSTACK t0, t1, t2 - Switch to the interrupt stack
* USE_INTSTACK t0, t1, t2, t3 - Switch to the interrupt stack
* jal handler - Handle the exception IN=old regs OUT=new regs
* di - Disable interrupts
* RESTORE_STACK t0, t1 - Undo the operations of USE_STACK
@ -368,7 +368,7 @@
*
* On Entry:
* sp - Current value of the user stack pointer
* tmp1, tmp2, and tmp3 are registers that can be used temporarily.
* tmp1, tmp2, tmp3, and tmp4 are registers that can be used temporarily.
* All interrupts should still be disabled.
*
* At completion:
@ -378,7 +378,7 @@
*
********************************************************************************************/
.macro USE_INTSTACK, tmp1, tmp2, tmp3
.macro USE_INTSTACK, tmp1, tmp2, tmp3, tmp4
#if CONFIG_ARCH_INTERRUPTSTACK > 3
#ifdef CONFIG_PIC32MZ_NESTED_INTERRUPTS
@ -398,9 +398,9 @@
*/
la \tmp3, g_intstackbase
lw \tmp, (\tmp3)
sw sp, (\tmp3)
move sp, \tmp3
lw \tmp4, (\tmp3)
sw sp, (\tmp4)
move sp, \tmp4
#ifdef CONFIG_PIC32MZ_NESTED_INTERRUPTS
1:

View File

@ -561,8 +561,8 @@ __start:
_exception_handler:
EXCPT_PROLOGUE t0 /* Save registers on stack, enable nested interrupts */
move a0, sp /* Pass register save structure as the parameter 1 */
USE_INTSTACK t0, t1, t2 /* Switch to the interrupt stack */
la t0, pic32mz_exception /* Call pic32mz_exception(regs) */
USE_INTSTACK t0, t1, t2, t3 /* Switch to the interrupt stack */
la t0, pic32mz_exception /* Call pic32mz_exception(regs) */
jalr ra, t0
nop
#ifdef CONFIG_PIC32MZ_NESTED_INTERRUPTS
@ -590,7 +590,7 @@ _exception_handler:
_int_handler:
EXCPT_PROLOGUE t0 /* Save registers on stack, enable nested interrupts */
move a0, sp /* Pass register save structure as the parameter 1 */
USE_INTSTACK t0, t1, t2 /* Switch to the interrupt stack */
USE_INTSTACK t0, t1, t2, t3 /* Switch to the interrupt stack */
la t0, pic32mz_decodeirq /* Call pic32mz_decodeirq(regs) */
jalr ra, t0
nop
@ -620,7 +620,7 @@ _int_handler:
_nmi_handler:
EXCPT_PROLOGUE t0 /* Save registers on stack, enable nested interrupts */
move a0, sp /* Pass register save structure as the parameter 1 */
USE_INTSTACK t0, t1, t2 /* Switch to the interrupt stack */
USE_INTSTACK t0, t1, t2, t3 /* Switch to the interrupt stack */
la t0, pic32mz_donmi /* Call up_donmi(regs) */
jalr ra, t0
nop