aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2016-02-16 15:56:04 +0100
committerClaudiu Zissulescu <claziss@synopsys.com>2016-02-16 15:56:04 +0100
commit726c18e1c8a74682270bcd80f7145cda3cc76389 (patch)
tree1faccfeac0ec39d42e31effdaa9e4ab0f0e8ebd6 /gas/config
parentc4ef31bf6fb68f0024800565a532015fc3390aaa (diff)
downloadgdb-726c18e1c8a74682270bcd80f7145cda3cc76389.zip
gdb-726c18e1c8a74682270bcd80f7145cda3cc76389.tar.gz
gdb-726c18e1c8a74682270bcd80f7145cda3cc76389.tar.bz2
[ARC] Enable .cfi_* pseudo-ops.
gas/ 2016-02-16 Claudiu Zissulescu <claziss@synopsys.com> * config/tc-arc.c (tc_arc_frame_initial_instructions): New function. (tc_arc_regname_to_dw2regnum): Likewise. * config/tc-arc.h (TARGET_USE_CFIPOP): Define (tc_cfi_frame_initial_instructions): Likewise. (tc_regname_to_dw2regnum): Likewise. gas/testsuite 2016-02-16 Claudiu Zissulescu <claziss@synopsys.com> * gas/cfi/cfi-arc-1.d: New file. * gas/cfi/cfi-arc-1.s: Likewise. * gas/cfi/cfi.exp: Allow running tests for arc. binutils/ 2016-02-16 Claudiu Zissulescu <claziss@synopsys.com> * readelf.c (is_32bit_pcrel_reloc): Add R_ARC_32_PCREL.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arc.c22
-rw-r--r--gas/config/tc-arc.h9
2 files changed, 31 insertions, 0 deletions
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index f2d3a0e..bfe9ae1 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -24,6 +24,7 @@
#include "subsegs.h"
#include "struc-symbol.h"
#include "dwarf2dbg.h"
+#include "dw2gencfi.h"
#include "safe-ctype.h"
#include "opcode/arc.h"
@@ -3675,3 +3676,24 @@ arc_pcrel_adjust (fragS *fragP)
return 0;
}
+
+/* Initialize the DWARF-2 unwind information for this procedure. */
+
+void
+tc_arc_frame_initial_instructions (void)
+{
+ /* Stack pointer is register 28. */
+ cfi_add_CFA_def_cfa_register (28);
+}
+
+int
+tc_arc_regname_to_dw2regnum (char *regname)
+{
+ struct symbol *sym;
+
+ sym = hash_find (arc_reg_hash, regname);
+ if (sym)
+ return S_GET_VALUE (sym);
+
+ return -1;
+}
diff --git a/gas/config/tc-arc.h b/gas/config/tc-arc.h
index acd007b..95efd77 100644
--- a/gas/config/tc-arc.h
+++ b/gas/config/tc-arc.h
@@ -191,12 +191,21 @@ extern void arc_handle_align (fragS *);
extern void arc_cons_fix_new (fragS *, int, int, expressionS *,
bfd_reloc_code_real_type);
extern void arc_frob_label (symbolS *);
+extern void tc_arc_frame_initial_instructions (void);
+extern int tc_arc_regname_to_dw2regnum (char *regname);
/* The blink register is r31. */
#define DWARF2_DEFAULT_RETURN_COLUMN 31
/* Registers are generally saved at negative offsets to the CFA. */
#define DWARF2_CIE_DATA_ALIGNMENT (-4)
+/* We want .cfi_* pseudo-ops for generating unwind info. */
+#define TARGET_USE_CFIPOP 1
+
+/* CFI hooks. */
+#define tc_cfi_frame_initial_instructions tc_arc_frame_initial_instructions
+#define tc_regname_to_dw2regnum tc_arc_regname_to_dw2regnum
+
/* Define the NOPs. */
#define NOP_OPCODE_S 0x000078E0
#define NOP_OPCODE_L 0x264A7000 /* mov 0,0. */