diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2013-02-09 22:00:01 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2013-02-09 22:00:01 +0000 |
commit | 42c5054fed41bee925dfaafcfb273fe3ec9b58ea (patch) | |
tree | 757b245202245b69eebe80d30a165a0b6d96fa85 /gnu | |
parent | 38c3e209db0381b80a2476da64b045ff27b5ead2 (diff) |
Add CFI support for MIPS.
Backported from binutils 2.17.
ok miod@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils/gas/config/tc-mips.c | 8 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gas/config/tc-mips.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gas/config/tc-mips.c b/gnu/usr.bin/binutils/gas/config/tc-mips.c index ace9b27a3bd..e1de55c59b5 100644 --- a/gnu/usr.bin/binutils/gas/config/tc-mips.c +++ b/gnu/usr.bin/binutils/gas/config/tc-mips.c @@ -33,6 +33,7 @@ #include "opcode/mips.h" #include "itbl-ops.h" #include "dwarf2dbg.h" +#include "dw2gencfi.h" #ifdef DEBUG #define DBG(x) printf x @@ -14590,6 +14591,13 @@ mips_dwarf2_addr_size (void) return 4; } +/* Standard calling conventions leave the CFA at SP on entry. */ +void +mips_cfi_frame_initial_instructions (void) +{ + cfi_add_CFA_def_cfa_register (SP); +} + int tc_mips_regname_to_dw2regnum (char *regname) { diff --git a/gnu/usr.bin/binutils/gas/config/tc-mips.h b/gnu/usr.bin/binutils/gas/config/tc-mips.h index 42f36c65869..7ed48e486cb 100644 --- a/gnu/usr.bin/binutils/gas/config/tc-mips.h +++ b/gnu/usr.bin/binutils/gas/config/tc-mips.h @@ -185,6 +185,14 @@ extern enum dwarf2_format mips_dwarf2_format (void); #define DWARF2_ADDR_SIZE(bfd) mips_dwarf2_addr_size () +#define TARGET_USE_CFIPOP 1 + +#define tc_cfi_frame_initial_instructions mips_cfi_frame_initial_instructions +extern void mips_cfi_frame_initial_instructions (void); + +#define DWARF2_DEFAULT_RETURN_COLUMN 31 +#define DWARF2_CIE_DATA_ALIGNMENT -4 + #define tc_regname_to_dw2regnum tc_mips_regname_to_dw2regnum extern int tc_mips_regname_to_dw2regnum (char *regname); |