diff options
author | Jakub Jelinek <jakub@redhat.com> | 2003-07-10 16:46:38 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2003-07-10 16:46:38 +0000 |
commit | 75e21f08dc057f373ed4b9c76ddc54b2e3a0ee9d (patch) | |
tree | cf79f4f416894f9a845e34c59453f1e463fba3ed /gas/testsuite | |
parent | eff26f7814f8020f59ea8819f2cb836c4dba2f84 (diff) | |
download | gdb-75e21f08dc057f373ed4b9c76ddc54b2e3a0ee9d.zip gdb-75e21f08dc057f373ed4b9c76ddc54b2e3a0ee9d.tar.gz gdb-75e21f08dc057f373ed4b9c76ddc54b2e3a0ee9d.tar.bz2 |
* config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): Define always.
(TARGET_USE_CFIPOP, tc_cfi_frame_initial_instructions,
tc_regname_to_dw2regnum, DWARF2_DEFAULT_RETURN_COLUMN,
DWARF2_CIE_DATA_ALIGNMENT): Define.
(ppc_cfi_frame_initial_instructions, tc_ppc_regname_to_dw2regnum): New
prototypes.
(ppc_cie_data_alignment): Declare.
* config/tc-ppc.c: Include dw2gencfi.h.
(ppc_cie_data_alignment): Define.
(md_begin): Initialize ppc_cie_data_alignment.
(ppc_cfi_frame_initial_instructions, tc_ppc_regname_to_dw2regnum): New
functions.
* config/tc-s390.h (DWARF2_LINE_MIN_INSN_LENGTH): Define always.
(TARGET_USE_CFIPOP, tc_cfi_frame_initial_instructions,
tc_regname_to_dw2regnum, DWARF2_DEFAULT_RETURN_COLUMN,
DWARF2_CIE_DATA_ALIGNMENT): Define.
(s390_cfi_frame_initial_instructions, tc_s390_regname_to_dw2regnum):
New prototypes.
(s390_cie_data_alignment): Declare.
* config/tc-s390.c: Include dw2gencfi.h.
(s390_cie_data_alignment): Define.
(md_begin): Initialize s390_cie_data_alignment.
(s390_cfi_frame_initial_instructions, tc_s390_regname_to_dw2regnum):
New functions.
* gas/cfi/cfi-ppc-1.s: New test.
* gas/cfi/cfi-ppc-1.d: New test.
* gas/cfi/cfi-s390-1.s: New test.
* gas/cfi/cfi-s390-1.s: New test.
* gas/cfi/cfi-s390x-1.s: New test.
* gas/cfi/cfi-s390x-1.s: New test.
* gas/cfi/cfi.exp: Run them.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-ppc-1.d | 30 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-ppc-1.s | 45 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-s390-1.d | 31 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-s390-1.s | 54 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-s390x-1.d | 34 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-s390x-1.s | 45 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi.exp | 9 |
8 files changed, 258 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 3793a1e..f747024 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2003-07-10 Jakub Jelinek <jakub@redhat.com> + + * gas/cfi/cfi-ppc-1.s: New test. + * gas/cfi/cfi-ppc-1.d: New test. + * gas/cfi/cfi-s390-1.s: New test. + * gas/cfi/cfi-s390-1.s: New test. + * gas/cfi/cfi-s390x-1.s: New test. + * gas/cfi/cfi-s390x-1.s: New test. + * gas/cfi/cfi.exp: Run them. + 2003-07-09 Alexandre Oliva <aoliva@redhat.com> 2002-02-20 Alexandre Oliva <aoliva@redhat.com> diff --git a/gas/testsuite/gas/cfi/cfi-ppc-1.d b/gas/testsuite/gas/cfi/cfi-ppc-1.d new file mode 100644 index 0000000..28cb64c --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-ppc-1.d @@ -0,0 +1,30 @@ +#readelf: -wf +#name: CFI on ppc +#as: -a32 + +The section .eh_frame contains: + +00000000 00000010 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 4 + Data alignment factor: -4 + Return address column: 65 + Augmentation data: 1b + + DW_CFA_def_cfa: r1 ofs 0 + +00000014 00000020 00000018 FDE cie=00000000 pc=0000001c..0000008c + DW_CFA_advance_loc: 4 to 00000020 + DW_CFA_def_cfa_offset: 48 + DW_CFA_advance_loc: 16 to 00000030 + DW_CFA_offset: r27 at cfa-20 + DW_CFA_offset: r26 at cfa-24 + DW_CFA_offset_extended_sf: r65 at cfa\+4 + DW_CFA_advance_loc: 8 to 00000038 + DW_CFA_offset: r28 at cfa-16 + DW_CFA_advance_loc: 8 to 00000040 + DW_CFA_offset: r29 at cfa-12 + DW_CFA_nop + DW_CFA_nop + diff --git a/gas/testsuite/gas/cfi/cfi-ppc-1.s b/gas/testsuite/gas/cfi/cfi-ppc-1.s new file mode 100644 index 0000000..e4b41cd --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-ppc-1.s @@ -0,0 +1,45 @@ +#; $ as -o test.o -a32 gas-cfi-test.s && gcc -nostdlib -o test test.o + + .file "a.c" + .text + .align 2 + .globl foo + .type foo, @function +foo: + .cfi_startproc + stwu 1,-48(1) + .cfi_adjust_cfa_offset 48 + mflr 0 + stw 0,52(1) + stw 26,24(1) + stw 27,28(1) + .cfi_offset 27,-20 + .cfi_offset %r26,-24 + .cfi_offset lr,4 + mr 27,5 + stw 28,32(1) + .cfi_offset %r.28,-16 + mr 28,4 + stw 29,36(1) + .cfi_offset 29,-12 + mr 29,3 + bl bar1 + mr 5,27 + mr 26,3 + mr 4,28 + mr 3,29 + bl syscall + mr 29,3 + mr 3,26 + bl bar2 + lwz 28,32(1) + lwz 0,52(1) + mr 3,29 + lwz 26,24(1) + lwz 27,28(1) + mtlr 0 + lwz 29,36(1) + addi 1,1,48 + blr + .cfi_endproc + .size foo, .-foo diff --git a/gas/testsuite/gas/cfi/cfi-s390-1.d b/gas/testsuite/gas/cfi/cfi-s390-1.d new file mode 100644 index 0000000..aa8dfe1 --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-s390-1.d @@ -0,0 +1,31 @@ +#readelf: -wf +#name: CFI on s390 +#as: -m31 -march=g5 + +The section .eh_frame contains: + +00000000 00000010 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -4 + Return address column: 14 + Augmentation data: 1b + + DW_CFA_def_cfa: r15 ofs 96 + +00000014 00000024 00000018 FDE cie=00000000 pc=0000001c..0000006a + DW_CFA_advance_loc: 4 to 00000020 + DW_CFA_offset: r15 at cfa-36 + DW_CFA_offset: r14 at cfa-40 + DW_CFA_offset: r13 at cfa-44 + DW_CFA_offset: r12 at cfa-48 + DW_CFA_offset: r11 at cfa-52 + DW_CFA_offset: r10 at cfa-56 + DW_CFA_offset: r9 at cfa-60 + DW_CFA_offset: r8 at cfa-64 + DW_CFA_advance_loc: 22 to 00000036 + DW_CFA_def_cfa_offset: 192 + DW_CFA_nop + DW_CFA_nop + diff --git a/gas/testsuite/gas/cfi/cfi-s390-1.s b/gas/testsuite/gas/cfi/cfi-s390-1.s new file mode 100644 index 0000000..45f9c1b --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-s390-1.s @@ -0,0 +1,54 @@ +#; $ as -o test.o -m31 -march=g5 gas-cfi-test.s && gcc -m32 -nostdlib -o test test.o + + .file "a.c" + .text + .align 4 + .globl foo + .type foo, @function +foo: + .cfi_startproc + stm %r8,%r15,32(%r15) + .cfi_offset %r15,-36 + .cfi_offset %r14,-40 + .cfi_offset %r13,-44 + .cfi_offset %r12,-48 + .cfi_offset %r11,-52 + .cfi_offset %r10,-56 + .cfi_offset %r9,-60 + .cfi_offset %r8,-64 + bras %r13,.L3 +.L2: + .align 4 +.LC0: + .long bar1 +.LC1: + .long syscall +.LC2: + .long bar2 + .align 2 +.L3: + lr %r14,%r15 + ahi %r15,-96 + .cfi_adjust_cfa_offset 96 + lr %r12,%r2 + l %r2,.LC0-.L2(%r13) + lr %r10,%r3 + lr %r9,%r4 + st %r14,0(%r15) + basr %r14,%r2 + l %r1,.LC1-.L2(%r13) + lr %r4,%r9 + lr %r8,%r2 + lr %r3,%r10 + lr %r2,%r12 + basr %r14,%r1 + l %r1,.LC2-.L2(%r13) + lr %r12,%r2 + lr %r2,%r8 + basr %r14,%r1 + lr %r2,%r12 + l %r4,152(%r15) + lm %r8,%r15,128(%r15) + br %r4 + .cfi_endproc + .size foo, .-foo diff --git a/gas/testsuite/gas/cfi/cfi-s390x-1.d b/gas/testsuite/gas/cfi/cfi-s390x-1.d new file mode 100644 index 0000000..88438f2 --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-s390x-1.d @@ -0,0 +1,34 @@ +#readelf: -wf +#name: CFI on s390x +#as: -m64 -march=z900 + +The section .eh_frame contains: + +00000000 00000011 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 14 + Augmentation data: 1b + + DW_CFA_def_cfa: r15 ofs 160 + +00000015 00000027 00000019 FDE cie=00000000 pc=0000001d..0000008d + DW_CFA_advance_loc: 6 to 00000023 + DW_CFA_offset: r15 at cfa-40 + DW_CFA_offset: r14 at cfa-48 + DW_CFA_offset: r13 at cfa-56 + DW_CFA_offset: r12 at cfa-64 + DW_CFA_offset: r11 at cfa-72 + DW_CFA_offset: r10 at cfa-80 + DW_CFA_offset: r9 at cfa-88 + DW_CFA_offset: r8 at cfa-96 + DW_CFA_advance_loc: 8 to 0000002b + DW_CFA_def_cfa_offset: 320 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + diff --git a/gas/testsuite/gas/cfi/cfi-s390x-1.s b/gas/testsuite/gas/cfi/cfi-s390x-1.s new file mode 100644 index 0000000..7781229 --- /dev/null +++ b/gas/testsuite/gas/cfi/cfi-s390x-1.s @@ -0,0 +1,45 @@ +#; $ as -o test.o -m64 -march=z900 gas-cfi-test.s && gcc -m64 -nostdlib -o test test.o + + .file "a.c" + .text + .align 4 + .globl foo + .type foo, @function +foo: + .cfi_startproc + stmg %r8,%r15,64(%r15) + .cfi_offset %r15,-40 + .cfi_offset %r14,-48 + .cfi_offset %r13,-56 + .cfi_offset %r12,-64 + .cfi_offset %r11,-72 + .cfi_offset %r10,-80 + .cfi_offset %r9,-88 + .cfi_offset %r8,-96 + lgr %r14,%r15 + aghi %r15,-160 + .cfi_adjust_cfa_offset 160 + lgr %r12,%r3 + lgr %r10,%r4 + lgr %r9,%r2 + lgfr %r9,%r9 + stg %r14,0(%r15) + brasl %r14,bar1 + lgfr %r12,%r12 + lgfr %r10,%r10 + lgr %r3,%r12 + lgr %r4,%r10 + lgr %r8,%r2 + lgr %r2,%r9 + brasl %r14,syscall + lgfr %r8,%r8 + lgr %r12,%r2 + lgr %r2,%r8 + brasl %r14,bar2 + lgfr %r12,%r12 + lgr %r2,%r12 + lg %r4,272(%r15) + lmg %r8,%r15,224(%r15) + br %r4 + .cfi_endproc + .size foo, .-foo diff --git a/gas/testsuite/gas/cfi/cfi.exp b/gas/testsuite/gas/cfi/cfi.exp index 6592bbe..8824c22 100644 --- a/gas/testsuite/gas/cfi/cfi.exp +++ b/gas/testsuite/gas/cfi/cfi.exp @@ -27,6 +27,15 @@ if [istarget "x86_64-*"] then { run_dump_test "cfi-alpha-2" run_dump_test "cfi-alpha-3" +} elseif { [istarget ppc*-*-*] || [istarget powerpc*-*-*] } then { + run_dump_test "cfi-ppc-1" + +} elseif { [istarget s390*-*-*] } then { + run_dump_test "cfi-s390-1" + if { [istarget s390x*-*-*] } then { + run_dump_test "cfi-s390x-1" + } + } else { return } |