10 b exception_entry /* SWI - not used so jump to general exception */
13 b exception_entry /* Not a vector, but if we ever get here... */
17 /* Start by setting up a stack */
19 /* Set up the stack pointer to a fixed value */
22 /* Setup a default stack-limit in-case the code has been
23 compiled with "-mapcs-stack-check". Hard-wiring this value
24 is not ideal, since there is currently no support for
25 checking that the heap and stack have not collided, or that
26 this default 64k is enough for the program being executed.
27 However, it ensures that this simple crt0 world will not
28 immediately cause an overflow event: */
29 sub sl, sp, #64 << 10 /* Still assumes 256bytes below sl */
33 .word -1 /* Syscall # */
34 .word 0 /* Arguments */
44 /* Zero-out the BSS segment */
45 mov a2, #0 /* Second arg: fill value */
46 mov fp, a2 /* Null frame pointer */
47 mov r7, a2 /* Null frame pointer for Thumb */
49 ldr a1, .LC1 /* First arg: start of memory block */
51 sub a3, a3, a1 /* Third arg: length of block */
54 /* Enter main with no arguments for now */
55 mov r0, #0 /* no arguments */
56 mov r1, #0 /* no argv either */
59 bl exit /* Should not return */
61 /* For Thumb, constants must be after the code since only
62 positive offsets are supported for PC relative addresses. */
71 /* Increment IRQ counter and return */
77 /* Increment FIQ counter and return */
.