| [444] | 1 | /* Copyright (c) 2001, 2009 Xilinx, Inc.  All rights reserved. | 
|---|
|  | 2 |  | 
|---|
|  | 3 | Redistribution and use in source and binary forms, with or without | 
|---|
|  | 4 | modification, are permitted provided that the following conditions are | 
|---|
|  | 5 | met: | 
|---|
|  | 6 |  | 
|---|
|  | 7 | 1.  Redistributions source code must retain the above copyright notice, | 
|---|
|  | 8 | this list of conditions and the following disclaimer. | 
|---|
|  | 9 |  | 
|---|
|  | 10 | 2.  Redistributions in binary form must reproduce the above copyright | 
|---|
|  | 11 | notice, this list of conditions and the following disclaimer in the | 
|---|
|  | 12 | documentation and/or other materials provided with the distribution. | 
|---|
|  | 13 |  | 
|---|
|  | 14 | 3.  Neither the name of Xilinx nor the names of its contributors may be | 
|---|
|  | 15 | used to endorse or promote products derived from this software without | 
|---|
|  | 16 | specific prior written permission. | 
|---|
|  | 17 |  | 
|---|
|  | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS | 
|---|
|  | 19 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 
|---|
|  | 20 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | 
|---|
|  | 21 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 
|---|
|  | 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 
|---|
|  | 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | 
|---|
|  | 24 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 
|---|
|  | 25 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | 
|---|
|  | 26 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | 
|---|
|  | 27 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 
|---|
|  | 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 
|---|
|  | 29 |  | 
|---|
|  | 30 |  | 
|---|
|  | 31 | MicroBlaze Vector Map for standalone executables that are boot-strapped | 
|---|
|  | 32 |  | 
|---|
|  | 33 | Address                Vector type                 Label | 
|---|
|  | 34 | -------                -----------                 ------ | 
|---|
|  | 35 |  | 
|---|
|  | 36 | # 0x00 #                (-- IMM --) | 
|---|
|  | 37 | # 0x04 #                Reset                       (-- Don't Care --) | 
|---|
|  | 38 |  | 
|---|
|  | 39 | # 0x08 #                (-- IMM --) | 
|---|
|  | 40 | # 0x0c #                Software Exception          _exception_handler | 
|---|
|  | 41 |  | 
|---|
|  | 42 | # 0x10 #                (-- IMM --) | 
|---|
|  | 43 | # 0x14 #                Hardware Interrupt          _interrupt_handler | 
|---|
|  | 44 |  | 
|---|
|  | 45 | # 0x18 #                (-- IMM --) | 
|---|
|  | 46 | # 0x1C #                Breakpoint Exception        (-- Don't Care --) | 
|---|
|  | 47 |  | 
|---|
|  | 48 | # 0x20 #                (-- IMM --) | 
|---|
|  | 49 | # 0x24 #                Hardware Exception          _hw_exception_handler | 
|---|
|  | 50 |  | 
|---|
|  | 51 | */ | 
|---|
|  | 52 |  | 
|---|
|  | 53 | .section .vectors.sw_exception, "ax" | 
|---|
|  | 54 | .align 2 | 
|---|
|  | 55 | _vector_sw_exception: | 
|---|
|  | 56 | brai    _exception_handler | 
|---|
|  | 57 |  | 
|---|
|  | 58 | .section .vectors.interrupt, "ax" | 
|---|
|  | 59 | .align 2 | 
|---|
|  | 60 | _vector_interrupt: | 
|---|
|  | 61 | brai    _interrupt_handler | 
|---|
|  | 62 |  | 
|---|
|  | 63 | .section .vectors.hw_exception, "ax" | 
|---|
|  | 64 | .align 2 | 
|---|
|  | 65 | _vector_hw_exception: | 
|---|
|  | 66 | brai    _hw_exception_handler | 
|---|
|  | 67 |  | 
|---|
|  | 68 | .section .text | 
|---|
|  | 69 | .globl _start | 
|---|
|  | 70 | .align 2 | 
|---|
|  | 71 | .ent _start | 
|---|
|  | 72 | .type _start, @function | 
|---|
|  | 73 | _start: | 
|---|
|  | 74 | la      r13, r0, _SDA_BASE_         /* Set the Small Data Anchors and the stack pointer */ | 
|---|
|  | 75 | la      r2, r0, _SDA2_BASE_ | 
|---|
|  | 76 | la      r1, r0, _stack-16           /* 16 bytes (4 words are needed by crtinit for args and link reg */ | 
|---|
|  | 77 |  | 
|---|
|  | 78 | brlid   r15, _crtinit               /* Initialize BSS and run program */ | 
|---|
|  | 79 | nop | 
|---|
|  | 80 |  | 
|---|
|  | 81 | brlid   r15, exit                   /* Call exit with the return value of main */ | 
|---|
|  | 82 | addik   r5, r3, 0 | 
|---|
|  | 83 |  | 
|---|
|  | 84 | /* Control does not reach here */ | 
|---|
|  | 85 |  | 
|---|
|  | 86 | .end _start | 
|---|
|  | 87 |  | 
|---|
|  | 88 | /* | 
|---|
|  | 89 | _exit | 
|---|
|  | 90 | Our simple _exit | 
|---|
|  | 91 | */ | 
|---|
|  | 92 | .globl _exit | 
|---|
|  | 93 | .align 2 | 
|---|
|  | 94 | .ent _exit | 
|---|
|  | 95 | .type _exit, @function | 
|---|
|  | 96 | _exit: | 
|---|
|  | 97 | bri     0 | 
|---|
|  | 98 | .end _exit | 
|---|