diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-08-02 22:33:26 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-14 01:59:55 +0900 |
commit | 0b930489b8606224b829c8a6037eac24249a97ec (patch) | |
tree | 058920e2d468999df15f83824753da8a2406a2dd /arch/sh/include | |
parent | bd353861c735b2265c9d8b2559960c693e7c68ab (diff) |
sh: Setup the frame register in asm code
In order to use DWARF unwinder info the frame register has to contain a
valid value. Whilst GCC takes care of this for C code, we have to do it
ourselves for assembly.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/entry-macros.S | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/sh/include/asm/entry-macros.S b/arch/sh/include/asm/entry-macros.S index 1bdd93891cd7..64fd0de24daf 100644 --- a/arch/sh/include/asm/entry-macros.S +++ b/arch/sh/include/asm/entry-macros.S @@ -108,3 +108,15 @@ #else # define PREF(x) nop #endif + + /* + * Macro for use within assembly. Because the DWARF unwinder + * needs to use the frame register to unwind the stack, we + * need to setup r14 with the value of the stack pointer as + * the return address is usually on the stack somewhere. + */ + .macro setup_frame_reg +#ifdef CONFIG_DWARF_UNWINDER + mov r15, r14 +#endif + .endm |