]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/powerpc/lib/reloc.S
Add GPL-2.0+ SPDX-License-Identifier to source files
[karo-tx-uboot.git] / arch / powerpc / lib / reloc.S
1 /*
2  * Copyright (C) 2009 Wolfgang Denk <wd@denx.de>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <ppc_asm.tmpl>
8
9         .file   "reloc.S"
10
11         .text
12 #ifndef CONFIG_NAND_SPL
13         /*
14          * Function: relocate entries for one exception vector
15          */
16         .globl trap_reloc
17         .type   trap_reloc, @function
18 trap_reloc:
19         lwz     r0, 0(r7)               /* hdlr ...             */
20         add     r0, r0, r3              /*  ... += dest_addr    */
21         stw     r0, 0(r7)
22
23         lwz     r0, 4(r7)               /* int_return ...       */
24         add     r0, r0, r3              /*  ... += dest_addr    */
25         stw     r0, 4(r7)
26
27         lwz     r0, 8(r7)               /* transfer_to_handler ...*/
28         add     r0, r0, r3              /*  ... += dest_addr    */
29         stw     r0, 8(r7)
30
31         blr
32         .size   trap_reloc, .-trap_reloc
33 #endif