diff options
author | Claudiu Zissulescu <claziss@synopsys.com> | 2016-02-16 15:56:04 +0100 |
---|---|---|
committer | Claudiu Zissulescu <claziss@synopsys.com> | 2016-02-16 15:56:04 +0100 |
commit | 726c18e1c8a74682270bcd80f7145cda3cc76389 (patch) | |
tree | 1faccfeac0ec39d42e31effdaa9e4ab0f0e8ebd6 /gas/testsuite | |
parent | c4ef31bf6fb68f0024800565a532015fc3390aaa (diff) | |
download | gdb-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/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-arc-1.d | 30 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-arc-1.s | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi.exp | 3 |
4 files changed, 58 insertions, 1 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog new file mode 100644 index 0000000..e9652f8 --- /dev/null +++ b/gas/testsuite/ChangeLog @@ -0,0 +1,5 @@ +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. diff --git a/gas/testsuite/gas/cfi/cfi-arc-1.d b/gas/testsuite/gas/cfi/cfi-arc-1.d new file mode 100644 index 0000000..cdb75bd --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-arc-1.d @@ -0,0 +1,30 @@ +#readelf: -wf +#name: CFI on ARC + +Contents of the .eh_frame section: + +00000000 00000010 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -4 + Return address column: 31 + Augmentation data: 1b + + DW_CFA_def_cfa_register: r28 + DW_CFA_nop + +00000014 00000020 00000018 FDE cie=00000000 pc=00000000..00000010 + DW_CFA_advance_loc: 4 to 00000004 + DW_CFA_def_cfa_offset: 48 + DW_CFA_offset: r13 at cfa-48 + DW_CFA_advance_loc: 4 to 00000008 + DW_CFA_def_cfa_offset: 52 + DW_CFA_offset: r14 at cfa-44 + DW_CFA_offset: r15 at cfa-40 + DW_CFA_advance_loc: 4 to 0000000c + DW_CFA_offset: r27 at cfa-52 + DW_CFA_advance_loc: 2 to 0000000e + DW_CFA_def_cfa_register: r27 + DW_CFA_nop + diff --git a/gas/testsuite/gas/cfi/cfi-arc-1.s b/gas/testsuite/gas/cfi/cfi-arc-1.s new file mode 100644 index 0000000..5d4f99d --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-arc-1.s @@ -0,0 +1,21 @@ + .file "foo.c" + .cpu HS + .section .text + .align 4 + .cfi_startproc +foo: + st.a r13,[sp,-48] + .cfi_def_cfa_offset 48 + .cfi_offset r13, -48 +.LCFI0: + std r14,[sp,4] + .cfi_adjust_cfa_offset 4 + .cfi_offset r14, -44 + .cfi_rel_offset r15, 12 + st.a fp,[sp,-4] + .cfi_rel_offset fp, 0 + mov_s fp,sp + .cfi_def_cfa_register fp + j_s [blink] + .cfi_endproc + .size foo, .-foo diff --git a/gas/testsuite/gas/cfi/cfi.exp b/gas/testsuite/gas/cfi/cfi.exp index 379e6f4..4a8d3ba 100644 --- a/gas/testsuite/gas/cfi/cfi.exp +++ b/gas/testsuite/gas/cfi/cfi.exp @@ -91,7 +91,8 @@ if { [istarget "i*86-*-*"] || [istarget "x86_64-*-*"] } then { } else { run_dump_test "cfi-sh-1" } - +} elseif { [istarget "arc*-*-*"] } then { + run_dump_test "cfi-arc-1" } elseif { [istarget "arm*-*"] } then { # Only ELF based ARM targets support CFI. if { [is_pecoff_format] } then { |