sh: Add CFI annotations for exception return.
authorMatt Fleming <matt@console-pimps.org>
Sun, 2 Aug 2009 21:40:11 +0000 (22:40 +0100)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 13 Aug 2009 17:02:07 +0000 (02:02 +0900)
Annotate various assembly code paths with CFI assembler directives so
that DWARF unwind info is available for the unwinder.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/entry-common.S

index b3b215fb21f7fe70cfc9f9e33d3466f8c84f7ba1..e63178fefb9b880251fce26071a778c57bcd072c 100644 (file)
@@ -43,6 +43,7 @@
  *     syscall #
  *
  */
+#include <asm/dwarf.h>
 
 #if defined(CONFIG_PREEMPT)
 #  define preempt_stop()       cli ; TRACE_IRQS_OFF
@@ -66,6 +67,11 @@ ENTRY(exception_error)
 
        .align  2
 ret_from_exception:
+       CFI_STARTPROC simple
+       CFI_DEF_CFA r14, 0
+       CFI_REL_OFFSET 17, 64
+       CFI_REL_OFFSET 15, 0
+       CFI_REL_OFFSET 14, 56
        preempt_stop()
 ENTRY(ret_from_irq)
        !
@@ -240,6 +246,7 @@ debug_trap:
         nop
        bra     __restore_all
         nop
+       CFI_ENDPROC
 
        .align  2
 1:     .long   debug_trap_table