diff options
author | Kaz Kojima <kkojima@rr.iij4u.or.jp> | 2004-03-18 00:49:23 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@rr.iij4u.or.jp> | 2004-03-18 00:49:23 +0000 |
commit | 2ce4cc60250621eab0d9ae587e8b2ba1b8603236 (patch) | |
tree | 263779898cef850321638cf84ca46c84ca15b975 /gas/testsuite | |
parent | cfef7cefb00af49639f979223382c5e837d9e78e (diff) | |
download | gdb-2ce4cc60250621eab0d9ae587e8b2ba1b8603236.zip gdb-2ce4cc60250621eab0d9ae587e8b2ba1b8603236.tar.gz gdb-2ce4cc60250621eab0d9ae587e8b2ba1b8603236.tar.bz2 |
[gas]
* config/tc-sh.c: Include dw2gencfi.h.
(sh_cfi_frame_initial_instructions): New function.
(sh_regname_to_dw2regnum): Likewise.
* config/tc-sh.h (DWARF2_LINE_MIN_INSN_LENGTH): Move to the end of
file.
(TARGET_USE_CFIPOP): Define.
(tc_cfi_frame_initial_instructions): Likewise.
(tc_regname_to_dw2regnum): Likewise.
(DWARF2_DEFAULT_RETURN_COLUMN, DWARF2_CIE_DATA_ALIGNMENT): Likewise.
* Makefile.am: Update dependencies.
* Makefile.in: Regenerate.
[gas/testsuite]
* gas/cfi/cfi-sh-1.d: New file.
* gas/cfi/cfi-sh-1.s: Likewise.
* gas/cfi/cfi.exp: Add SH case.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-sh-1.d | 29 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-sh-1.s | 39 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi.exp | 7 |
4 files changed, 81 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index be93703..0eb9ca4 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp> + + * gas/cfi/cfi-sh-1.d: New file. + * gas/cfi/cfi-sh-1.s: Likewise. + * gas/cfi/cfi.exp: Add SH case. + 2004-03-16 Alan Modra <amodra@bigpond.net.au> * gas/ppc/altivec.d: Update. diff --git a/gas/testsuite/gas/cfi/cfi-sh-1.d b/gas/testsuite/gas/cfi/cfi-sh-1.d new file mode 100644 index 0000000..fac7484 --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-sh-1.d @@ -0,0 +1,29 @@ +#readelf: -wf +#name: CFI on SH +The section .eh_frame contains: + +00000000 00000010 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 2 + Data alignment factor: -4 + Return address column: 17 + Augmentation data: 1b + + DW_CFA_def_cfa: r15 ofs 0 + +00000014 00000020 00000018 FDE cie=00000000 pc=0000001c..00000048 + DW_CFA_advance_loc: 2 to 0000001e + DW_CFA_def_cfa_offset: 4 + DW_CFA_advance_loc: 2 to 00000020 + DW_CFA_def_cfa_offset: 8 + DW_CFA_offset: r15 at cfa-4 + DW_CFA_offset: r17 at cfa-8 + DW_CFA_advance_loc: 6 to 00000026 + DW_CFA_def_cfa_reg: r14 + DW_CFA_advance_loc: 2 to 00000028 + DW_CFA_def_cfa_offset: 40 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + diff --git a/gas/testsuite/gas/cfi/cfi-sh-1.s b/gas/testsuite/gas/cfi/cfi-sh-1.s new file mode 100644 index 0000000..29fc63e --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-sh-1.s @@ -0,0 +1,39 @@ + .file "a.c" + .text + .align 1 + .globl foo + .type foo, @function +foo: + .cfi_startproc + mov.l r14,@-r15 + .cfi_adjust_cfa_offset 4 + sts.l pr,@-r15 + .cfi_adjust_cfa_offset 4 + .cfi_offset r15,-4 + .cfi_offset pr,-8 + tst r4,r4 + bt/s .L2 + mov r15,r14 + .cfi_def_cfa_register r14 + add #-32,r15 + .cfi_adjust_cfa_offset 32 + mov.l .L3,r0 + jsr @r0 + mov r15,r4 +.L2: + mov.l .L4,r0 + jsr @r0 + nop + mov #0,r0 + mov r14,r15 + lds.l @r15+,pr + rts + mov.l @r15+,r14 +.L5: + .align 2 +.L3: + .long bar +.L4: + .long baz + .cfi_endproc + .size foo, .-foo diff --git a/gas/testsuite/gas/cfi/cfi.exp b/gas/testsuite/gas/cfi/cfi.exp index d09d6fd..f32a047 100644 --- a/gas/testsuite/gas/cfi/cfi.exp +++ b/gas/testsuite/gas/cfi/cfi.exp @@ -49,6 +49,13 @@ if [istarget "x86_64-*"] then { if { [regexp "elf64\[_-\]sparc" $nm_help] } then { run_dump_test "cfi-sparc64-1" } + +} elseif [istarget "sh*-*"] then { + if { [istarget sh64*-*-*] || [istarget sh5*-*-*] } then { + } else { + run_dump_test "cfi-sh-1" + } + } else { return } |