blob: 513141f228ea335f9f6ea230033160af68addaf0 [file] [log] [blame]
Joakim Tjernlund4ff6bc02010-01-19 14:41:55 +01001/*
2 * Copyright (C) 2009 Wolfgang Denk <wd@denx.de>
3 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Joakim Tjernlund4ff6bc02010-01-19 14:41:55 +01005 */
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
18trap_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