aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/startup/e200/devices/SPC560BCxx/boot.S
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-02-07 14:12:58 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-02-07 14:12:58 +0000
commite3d87e924536a80ae78fe6868f34a4d4a8bc1ecc (patch)
tree8ad6ec935b13c0e449d40e1ba265ad25f43aa1d4 /os/common/startup/e200/devices/SPC560BCxx/boot.S
parent8872d9680cc3b2a91e1a818f02f9befa7811ceb7 (diff)
downloadChibiOS-e3d87e924536a80ae78fe6868f34a4d4a8bc1ecc.tar.gz
ChibiOS-e3d87e924536a80ae78fe6868f34a4d4a8bc1ecc.tar.bz2
ChibiOS-e3d87e924536a80ae78fe6868f34a4d4a8bc1ecc.zip
Unified HighTec and plain GCC compiler ports for e200z. Demos defaulted to GCC.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10097 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/startup/e200/devices/SPC560BCxx/boot.S')
-rw-r--r--os/common/startup/e200/devices/SPC560BCxx/boot.S180
1 files changed, 92 insertions, 88 deletions
diff --git a/os/common/startup/e200/devices/SPC560BCxx/boot.S b/os/common/startup/e200/devices/SPC560BCxx/boot.S
index f7a99c2d7..73905b9bd 100644
--- a/os/common/startup/e200/devices/SPC560BCxx/boot.S
+++ b/os/common/startup/e200/devices/SPC560BCxx/boot.S
@@ -24,6 +24,10 @@
#include "boot.h"
+#if defined(__HIGHTEC__)
+#define se_bge bge
+#endif
+
#if !defined(__DOXYGEN__)
/* BAM record.*/
@@ -37,35 +41,35 @@
.type _reset_address, @function
_reset_address:
#if BOOT_PERFORM_CORE_INIT
- bl _coreinit
+ e_bl _coreinit
#endif
- bl _ivinit
+ e_bl _ivinit
#if BOOT_RELOCATE_IN_RAM
/*
* Image relocation in RAM.
*/
- lis %r4, __ram_reloc_start__@h
- ori %r4, %r4, __ram_reloc_start__@l
- lis %r5, __ram_reloc_dest__@h
- ori %r5, %r5, __ram_reloc_dest__@l
- lis %r6, __ram_reloc_end__@h
- ori %r6, %r6, __ram_reloc_end__@l
+ e_lis r4, __ram_reloc_start__@h
+ e_or2i r4, __ram_reloc_start__@l
+ e_lis r5, __ram_reloc_dest__@h
+ e_or2i r5, __ram_reloc_dest__@l
+ e_lis r6, __ram_reloc_end__@h
+ e_or2i r6, r6, __ram_reloc_end__@l
.relloop:
- cmpl cr0, %r4, %r6
- bge cr0, .relend
- lwz %r7, 0(%r4)
- addi %r4, %r4, 4
- stw %r7, 0(%r5)
- addi %r5, %r5, 4
- b .relloop
+ se_cmpl r4, r6
+ se_bge .relend
+ se_lwz r7, 0(r4)
+ se_addi r4, 4
+ se_stw r7, 0(r5)
+ se_addi r5, 4
+ se_b .relloop
.relend:
- lis %r3, _boot_address@h
- ori %r3, %r3, _boot_address@l
- mtctr %r3
- bctrl
+ e_lis r3, _boot_address@h
+ e_or2i r3, _boot_address@l
+ mtctr r3
+ se_bctrl
#else
- b _boot_address
+ e_b _boot_address
#endif
#if BOOT_PERFORM_CORE_INIT
@@ -76,57 +80,57 @@ _coreinit:
* order to initialize the ECC detection hardware, this is going to
* slow down the startup but there is no way around.
*/
- xor %r0, %r0, %r0
- xor %r1, %r1, %r1
- xor %r2, %r2, %r2
- xor %r3, %r3, %r3
- xor %r4, %r4, %r4
- xor %r5, %r5, %r5
- xor %r6, %r6, %r6
- xor %r7, %r7, %r7
- xor %r8, %r8, %r8
- xor %r9, %r9, %r9
- xor %r10, %r10, %r10
- xor %r11, %r11, %r11
- xor %r12, %r12, %r12
- xor %r13, %r13, %r13
- xor %r14, %r14, %r14
- xor %r15, %r15, %r15
- xor %r16, %r16, %r16
- xor %r17, %r17, %r17
- xor %r18, %r18, %r18
- xor %r19, %r19, %r19
- xor %r20, %r20, %r20
- xor %r21, %r21, %r21
- xor %r22, %r22, %r22
- xor %r23, %r23, %r23
- xor %r24, %r24, %r24
- xor %r25, %r25, %r25
- xor %r26, %r26, %r26
- xor %r27, %r27, %r27
- xor %r28, %r28, %r28
- xor %r29, %r29, %r29
- xor %r30, %r30, %r30
- xor %r31, %r31, %r31
- lis %r4, __ram_start__@h
- ori %r4, %r4, __ram_start__@l
- lis %r5, __ram_end__@h
- ori %r5, %r5, __ram_end__@l
+ xor r0, r0, r0
+ xor r1, r1, r1
+ xor r2, r2, r2
+ xor r3, r3, r3
+ xor r4, r4, r4
+ xor r5, r5, r5
+ xor r6, r6, r6
+ xor r7, r7, r7
+ xor r8, r8, r8
+ xor r9, r9, r9
+ xor r10, r10, r10
+ xor r11, r11, r11
+ xor r12, r12, r12
+ xor r13, r13, r13
+ xor r14, r14, r14
+ xor r15, r15, r15
+ xor r16, r16, r16
+ xor r17, r17, r17
+ xor r18, r18, r18
+ xor r19, r19, r19
+ xor r20, r20, r20
+ xor r21, r21, r21
+ xor r22, r22, r22
+ xor r23, r23, r23
+ xor r24, r24, r24
+ xor r25, r25, r25
+ xor r26, r26, r26
+ xor r27, r27, r27
+ xor r28, r28, r28
+ xor r29, r29, r29
+ xor r30, r30, r30
+ xor r31, r31, r31
+ e_lis r4, __ram_start__@h
+ e_or2i r4, __ram_start__@l
+ e_lis r5, __ram_end__@h
+ e_or2i r5, __ram_end__@l
.cleareccloop:
- cmpl %cr0, %r4, %r5
- bge %cr0, .cleareccend
- stmw %r16, 0(%r4)
- addi %r4, %r4, 64
- b .cleareccloop
+ se_cmpl r4, r5
+ se_bge .cleareccend
+ e_stmw r16, 0(r4)
+ e_addi r4, r4, 64
+ se_b .cleareccloop
.cleareccend:
/*
* Branch prediction enabled.
*/
- li %r3, BOOT_BUCSR_DEFAULT
- mtspr 1013, %r3 /* BUCSR */
+ e_li r3, BOOT_BUCSR_DEFAULT
+ mtspr 1013, r3 /* BUCSR */
- blr
+ se_blr
#endif /* BOOT_PERFORM_CORE_INIT */
/*
@@ -135,52 +139,52 @@ _coreinit:
.align 2
_ivinit:
/* MSR initialization.*/
- lis %r3, BOOT_MSR_DEFAULT@h
- ori %r3, %r3, BOOT_MSR_DEFAULT@l
- mtMSR %r3
+ e_lis r3, BOOT_MSR_DEFAULT@h
+ e_or2i r3, BOOT_MSR_DEFAULT@l
+ mtMSR r3
/* IVPR initialization.*/
- lis %r3, __ivpr_base__@h
- ori %r3, %r3, __ivpr_base__@l
- mtIVPR %r3
+ e_lis r3, __ivpr_base__@h
+ e_or2i r3, __ivpr_base__@l
+ mtIVPR r3
- blr
+ se_blr
.section .ivors, "ax"
.globl IVORS
IVORS:
- b _IVOR0
+ e_b _IVOR0
.align 4
- b _IVOR1
+ e_b _IVOR1
.align 4
- b _IVOR2
+ e_b _IVOR2
.align 4
- b _IVOR3
+ e_b _IVOR3
.align 4
- b _IVOR4
+ e_b _IVOR4
.align 4
- b _IVOR5
+ e_b _IVOR5
.align 4
- b _IVOR6
+ e_b _IVOR6
.align 4
- b _IVOR7
+ e_b _IVOR7
.align 4
- b _IVOR8
+ e_b _IVOR8
.align 4
- b _IVOR9
+ e_b _IVOR9
.align 4
- b _IVOR10
+ e_b _IVOR10
.align 4
- b _IVOR11
+ e_b _IVOR11
.align 4
- b _IVOR12
+ e_b _IVOR12
.align 4
- b _IVOR13
+ e_b _IVOR13
.align 4
- b _IVOR14
+ e_b _IVOR14
.align 4
- b _IVOR15
+ e_b _IVOR15
.section .handlers, "ax"
@@ -207,7 +211,7 @@ _IVOR14:
_IVOR15:
.global _unhandled_exception
_unhandled_exception:
- b _unhandled_exception
+ se_b _unhandled_exception
#endif /* !defined(__DOXYGEN__) */