aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRandolph Chung <tausq@debian.org>2006-10-30 01:10:46 +0000
committerRandolph Chung <tausq@debian.org>2006-10-30 01:10:46 +0000
commit406601a1e304bd2ddf2be6a1e2be7899df620a69 (patch)
treefb4b4a1dbcea0b824309244ab72c1c859c97cf53 /gas
parentc79b7c30b4d110404f27cca9ed19de4f0e5af14a (diff)
downloadgdb-406601a1e304bd2ddf2be6a1e2be7899df620a69.zip
gdb-406601a1e304bd2ddf2be6a1e2be7899df620a69.tar.gz
gdb-406601a1e304bd2ddf2be6a1e2be7899df620a69.tar.bz2
2006-10-29 Randolph Chung <tausq@debian.org>
* gas/cfi/cfi.exp [hppa*-linux*]: Run hppa CFI test. * gas/cfi/cfi-hppa-1.s: New file. * gas/cfi/cfi-hppa-1.h: New file.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/cfi/cfi-hppa-1.d38
-rw-r--r--gas/testsuite/gas/cfi/cfi-hppa-1.s66
-rw-r--r--gas/testsuite/gas/cfi/cfi.exp2
4 files changed, 112 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 69c2ea8..23dc6a9 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-29 Randolph Chung <tausq@debian.org>
+
+ * gas/cfi/cfi.exp [hppa*-linux*]: Run hppa CFI test.
+ * gas/cfi/cfi-hppa-1.s: New file.
+ * gas/cfi/cfi-hppa-1.h: New file.
+
2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
* gas/ppc/cell.s: New file.
diff --git a/gas/testsuite/gas/cfi/cfi-hppa-1.d b/gas/testsuite/gas/cfi/cfi-hppa-1.d
new file mode 100644
index 0000000..7b06d55
--- /dev/null
+++ b/gas/testsuite/gas/cfi/cfi-hppa-1.d
@@ -0,0 +1,38 @@
+#readelf: -wf
+#name: CFI on hppa
+The section .eh_frame contains:
+
+00000000 00000010 00000000 CIE
+ Version: 1
+ Augmentation: "zR"
+ Code alignment factor: 4
+ Data alignment factor: -[48]
+ Return address column: 2
+ Augmentation data: 1b
+
+ DW_CFA_def_cfa: r30 ofs 0
+
+00000014 00000018 00000018 FDE cie=00000000 pc=00000000..00000018
+ DW_CFA_advance_loc: 8 to 00000008
+ DW_CFA_def_cfa_reg: r3
+ DW_CFA_advance_loc: 4 to 0000000c
+ DW_CFA_def_cfa_offset: 4660
+ DW_CFA_advance_loc: 8 to 00000014
+ DW_CFA_def_cfa_reg: r30
+ DW_CFA_nop
+
+00000030 00000018 00000034 FDE cie=00000000 pc=00000018..00000040
+ DW_CFA_advance_loc: 12 to 00000024
+ DW_CFA_def_cfa_reg: r3
+ DW_CFA_offset: r2 at cfa-24
+ DW_CFA_advance_loc: 24 to 0000003c
+ DW_CFA_def_cfa_reg: r30
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
+0000004c 00000010 00000050 FDE cie=00000000 pc=00000040..00000048
+ DW_CFA_nop
+ DW_CFA_nop
+ DW_CFA_nop
+
diff --git a/gas/testsuite/gas/cfi/cfi-hppa-1.s b/gas/testsuite/gas/cfi/cfi-hppa-1.s
new file mode 100644
index 0000000..923350c
--- /dev/null
+++ b/gas/testsuite/gas/cfi/cfi-hppa-1.s
@@ -0,0 +1,66 @@
+#; $ as -o test.o gas-cfi-test.s && gcc -nostdlib -o test test.o
+
+ .text
+ .align 4
+ .level 1.1
+
+.globl func_locvars
+ .type func_locvars, @function
+func_locvars:
+ .PROC
+ .CALLINFO FRAME=0x1234,NO_CALLS,SAVE_SP,ENTRY_GR=3
+ .ENTRY
+ .cfi_startproc
+ copy %r3,%r1
+ copy %r30,%r3
+ .cfi_def_cfa_register r3
+ stwm %r1,0x1234(%r30)
+ .cfi_adjust_cfa_offset 0x1234
+ ldo 64(%r3),%r30
+ ldwm -64(%r30),%r3
+ .cfi_def_cfa_register sp
+ bv,n %r0(%r2)
+ .cfi_endproc
+ .EXIT
+ .PROCEND
+
+.globl func_prologue
+ .type func_prologue, @function
+func_prologue:
+ .PROC
+ .CALLINFO FRAME=64,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=3
+ .ENTRY
+ .cfi_startproc
+#; This is not ABI-compliant but helps the test to run on both
+#; 32-bit and 64-bit targets
+ stw %r2,-24(%r30)
+ copy %r3,%r1
+ copy %r30,%r3
+ .cfi_def_cfa_register r3
+ .cfi_offset r2, -24
+ stwm %r1,64(%r30)
+ bl func_locvars,%r2
+ nop
+ ldw -20(%r3),%r2
+ ldo 64(%r3),%r30
+ ldwm -64(%r30),%r3
+ .cfi_def_cfa_register sp
+ bv,n %r0(%r2)
+ .cfi_endproc
+ .EXIT
+ .PROCEND
+
+ .align 4
+.globl main
+ .type main, @function
+main:
+ .PROC
+ .CALLINFO CALLS
+ .ENTRY
+ #; tail call - simple function that doesn't touch the stack
+ .cfi_startproc
+ b func_prologue
+ nop
+ .cfi_endproc
+ .EXIT
+ .PROCEND
diff --git a/gas/testsuite/gas/cfi/cfi.exp b/gas/testsuite/gas/cfi/cfi.exp
index eeb5510..de67b01 100644
--- a/gas/testsuite/gas/cfi/cfi.exp
+++ b/gas/testsuite/gas/cfi/cfi.exp
@@ -61,6 +61,8 @@ if [istarget "x86_64-*"] then {
} elseif { [istarget "mips*-*"] } then {
run_dump_test "cfi-mips-1"
+} elseif { [istarget "hppa*-linux*"] } then {
+ run_dump_test "cfi-hppa-1"
} else {
return
}