* 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-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.
--- /dev/null
+#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
+
--- /dev/null
+#; $ 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
} elseif { [istarget "mips*-*"] } then {
run_dump_test "cfi-mips-1"
+} elseif { [istarget "hppa*-linux*"] } then {
+ run_dump_test "cfi-hppa-1"
} else {
return
}