Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _DWARF2_H |
| 2 | #define _DWARF2_H 1 |
| 3 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | #ifndef __ASSEMBLY__ |
| 5 | #warning "asm/dwarf2.h should be only included in pure assembly files" |
| 6 | #endif |
| 7 | |
Joe Perches | c884534 | 2008-03-23 01:02:03 -0700 | [diff] [blame] | 8 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | Macros for dwarf2 CFI unwind table entries. |
Joe Perches | c884534 | 2008-03-23 01:02:03 -0700 | [diff] [blame] | 10 | See "as.info" for details on these pseudo ops. Unfortunately |
| 11 | they are only supported in very new binutils, so define them |
| 12 | away for older version. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | */ |
| 14 | |
Andi Kleen | e241491 | 2006-09-26 10:52:30 +0200 | [diff] [blame] | 15 | #ifdef CONFIG_AS_CFI |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
| 17 | #define CFI_STARTPROC .cfi_startproc |
| 18 | #define CFI_ENDPROC .cfi_endproc |
| 19 | #define CFI_DEF_CFA .cfi_def_cfa |
| 20 | #define CFI_DEF_CFA_REGISTER .cfi_def_cfa_register |
| 21 | #define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset |
| 22 | #define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset |
| 23 | #define CFI_OFFSET .cfi_offset |
| 24 | #define CFI_REL_OFFSET .cfi_rel_offset |
Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 25 | #define CFI_REGISTER .cfi_register |
| 26 | #define CFI_RESTORE .cfi_restore |
| 27 | #define CFI_REMEMBER_STATE .cfi_remember_state |
| 28 | #define CFI_RESTORE_STATE .cfi_restore_state |
Jan Beulich | 2765130 | 2006-01-11 22:41:59 +0100 | [diff] [blame] | 29 | #define CFI_UNDEFINED .cfi_undefined |
Jan Beulich | adf1423 | 2006-09-26 10:52:41 +0200 | [diff] [blame] | 30 | #ifdef CONFIG_AS_CFI_SIGNAL_FRAME |
| 31 | #define CFI_SIGNAL_FRAME .cfi_signal_frame |
| 32 | #else |
| 33 | #define CFI_SIGNAL_FRAME |
| 34 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
| 36 | #else |
| 37 | |
| 38 | /* use assembler line comment character # to ignore the arguments. */ |
| 39 | #define CFI_STARTPROC # |
| 40 | #define CFI_ENDPROC # |
| 41 | #define CFI_DEF_CFA # |
| 42 | #define CFI_DEF_CFA_REGISTER # |
| 43 | #define CFI_DEF_CFA_OFFSET # |
| 44 | #define CFI_ADJUST_CFA_OFFSET # |
| 45 | #define CFI_OFFSET # |
| 46 | #define CFI_REL_OFFSET # |
Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 47 | #define CFI_REGISTER # |
| 48 | #define CFI_RESTORE # |
| 49 | #define CFI_REMEMBER_STATE # |
| 50 | #define CFI_RESTORE_STATE # |
Jan Beulich | 2765130 | 2006-01-11 22:41:59 +0100 | [diff] [blame] | 51 | #define CFI_UNDEFINED # |
Jan Beulich | adf1423 | 2006-09-26 10:52:41 +0200 | [diff] [blame] | 52 | #define CFI_SIGNAL_FRAME # |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
| 54 | #endif |
| 55 | |
| 56 | #endif |