aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/PPC/SPC563Mxx/ivor.s
diff options
context:
space:
mode:
Diffstat (limited to 'os/ports/GCC/PPC/SPC563Mxx/ivor.s')
-rw-r--r--os/ports/GCC/PPC/SPC563Mxx/ivor.s20
1 files changed, 19 insertions, 1 deletions
diff --git a/os/ports/GCC/PPC/SPC563Mxx/ivor.s b/os/ports/GCC/PPC/SPC563Mxx/ivor.s
index de937ef17..19a8efd4e 100644
--- a/os/ports/GCC/PPC/SPC563Mxx/ivor.s
+++ b/os/ports/GCC/PPC/SPC563Mxx/ivor.s
@@ -20,7 +20,7 @@
/**
* @file SPC563Mxx/ivor.s
- * @brief PowerPC IVORx handlers.
+ * @brief SPC563Mxx IVORx handlers.
*
* @addtogroup PPC_CORE
* @{
@@ -50,6 +50,11 @@
IVOR10:
/* Creation of the external stack frame (extctx structure).*/
stwu %sp, -80(%sp) /* Size of the extctx structure.*/
+#if PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI
+ e_stmvsrrw 8(%sp) /* Saves PC, MSR. */
+ e_stmvsprw 16(%sp) /* Saves CR, LR, CTR, XER. */
+ e_stmvgprw 32(%sp) /* Saves GPR0, GPR3...GPR12. */
+#else /* !(PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI) */
stw %r0, 32(%sp) /* Saves GPR0. */
mfSRR0 %r0
stw %r0, 8(%sp) /* Saves PC. */
@@ -73,6 +78,7 @@ IVOR10:
stw %r10, 64(%sp)
stw %r11, 68(%sp)
stw %r12, 72(%sp)
+#endif /* !(PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI) */
/* Reset DIE bit in TSR register.*/
lis %r3, 0x0800 /* DIS bit mask. */
@@ -106,6 +112,11 @@ IVOR10:
IVOR4:
/* Creation of the external stack frame (extctx structure).*/
stwu %sp, -80(%sp) /* Size of the extctx structure.*/
+#if PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI
+ e_stmvsrrw 8(%sp) /* Saves PC, MSR. */
+ e_stmvsprw 16(%sp) /* Saves CR, LR, CTR, XER. */
+ e_stmvgprw 32(%sp) /* Saves GPR0, GPR3...GPR12. */
+#else /* !(PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI) */
stw %r0, 32(%sp) /* Saves GPR0. */
mfSRR0 %r0
stw %r0, 8(%sp) /* Saves PC. */
@@ -129,6 +140,7 @@ IVOR4:
stw %r10, 64(%sp)
stw %r11, 68(%sp)
stw %r12, 72(%sp)
+#endif /* !(PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI) */
/* Software vector address from the INTC register.*/
lis %r3, INTC_IACKR@h
@@ -170,6 +182,11 @@ IVOR4:
#if CH_DBG_SYSTEM_STATE_CHECK
bl dbg_check_unlock
#endif
+#if PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI
+ e_lmvgprw 32(%sp) /* Restores GPR0, GPR3...GPR12. */
+ e_lmvsprw 16(%sp) /* Restores CR, LR, CTR, XER. */
+ e_lmvsrrw 8(%sp) /* Restores PC, MSR. */
+#else /*!(PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI) */
lwz %r3, 36(%sp) /* Restores GPR3...GPR12. */
lwz %r4, 40(%sp)
lwz %r5, 44(%sp)
@@ -193,6 +210,7 @@ IVOR4:
lwz %r0, 28(%sp)
mtXER %r0 /* Restores XER. */
lwz %r0, 32(%sp) /* Restores GPR0. */
+#endif /* !(PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI) */
addi %sp, %sp, 80 /* Back to the previous frame. */
rfi