aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1993-10-29 05:14:07 +0000
committerJeff Law <law@redhat.com>1993-10-29 05:14:07 +0000
commit9b1b0ad1a6e5e066f5bb91c5b7401e58e32a8d6b (patch)
tree6f1659e1d581afee400a85239f96e968c5d83565 /gas/testsuite
parent7b5b8e511787601d24b54e3306bd7bb11a4c9a2a (diff)
downloadgdb-9b1b0ad1a6e5e066f5bb91c5b7401e58e32a8d6b.zip
gdb-9b1b0ad1a6e5e066f5bb91c5b7401e58e32a8d6b.tar.gz
gdb-9b1b0ad1a6e5e066f5bb91c5b7401e58e32a8d6b.tar.bz2
Relocation tests for the PA.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/hppa/reloc/.Sanitize40
-rwxr-xr-xgas/testsuite/gas/hppa/reloc/blebug.s16
-rwxr-xr-xgas/testsuite/gas/hppa/reloc/blebug2.s14
-rwxr-xr-xgas/testsuite/gas/hppa/reloc/labelopbug.s37
-rwxr-xr-xgas/testsuite/gas/hppa/reloc/plabelbug.s47
-rwxr-xr-xgas/testsuite/gas/hppa/reloc/reduce.s48
-rwxr-xr-xgas/testsuite/gas/hppa/reloc/relocreduce.s48
7 files changed, 250 insertions, 0 deletions
diff --git a/gas/testsuite/gas/hppa/reloc/.Sanitize b/gas/testsuite/gas/hppa/reloc/.Sanitize
new file mode 100644
index 0000000..05fa4f0
--- /dev/null
+++ b/gas/testsuite/gas/hppa/reloc/.Sanitize
@@ -0,0 +1,40 @@
+# Sanitize.in for devo.
+# $Id$
+#
+
+# Each directory to survive it's way into a release will need a file
+# like this one called "./.Sanitize". All keyword lines must exist,
+# and must exist in the order specified by this file. Each directory
+# in the tree will be processed, top down, in the following order.
+
+# Hash started lines like this one are comments and will be deleted
+# before anything else is done. Blank lines will also be squashed
+# out.
+
+# The lines between the "Do-first:" line and the "Things-to-keep:"
+# line are executed as a /bin/sh shell script before anything else is
+# done in this
+
+Do-first:
+
+
+# All files listed between the "Things-to-keep:" line and the
+# "Files-to-sed:" line will be kept. All other files will be removed.
+# Directories listed in this section will have their own Sanitize
+# called. Directories not listed will be removed in their entirety
+# with rm -rf.
+
+Things-to-keep:
+
+blebug.s
+blebug2.s
+labelopbug.s
+plabelbug.s
+reloc.exp
+relocreduce.s
+
+Things-to-lose:
+
+Do-last:
+
+# End of file.
diff --git a/gas/testsuite/gas/hppa/reloc/blebug.s b/gas/testsuite/gas/hppa/reloc/blebug.s
new file mode 100755
index 0000000..0930774
--- /dev/null
+++ b/gas/testsuite/gas/hppa/reloc/blebug.s
@@ -0,0 +1,16 @@
+ .SPACE $PRIVATE$
+ .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
+ .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
+ .SPACE $TEXT$
+ .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
+ .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
+
+ .SPACE $TEXT$
+ .SUBSPA $CODE$
+
+ .align 4
+ .IMPORT $$dyncall,MILLICODE ; Code for dynamic function calls.
+
+_sigtramp:
+ ldil L%$$dyncall,%r2 ; whose address is in r22.
+ ble R%$$dyncall(%sr4,%r2)
diff --git a/gas/testsuite/gas/hppa/reloc/blebug2.s b/gas/testsuite/gas/hppa/reloc/blebug2.s
new file mode 100755
index 0000000..9577b53
--- /dev/null
+++ b/gas/testsuite/gas/hppa/reloc/blebug2.s
@@ -0,0 +1,14 @@
+ .SPACE $PRIVATE$
+ .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
+ .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
+ .SPACE $TEXT$
+ .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
+ .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
+
+ .SPACE $TEXT$
+ .SUBSPA $CODE$
+
+ .align 4
+
+ ldil L%0xc0001004,%r1
+ ble R%0xc0001004(%sr7,%r1)
diff --git a/gas/testsuite/gas/hppa/reloc/labelopbug.s b/gas/testsuite/gas/hppa/reloc/labelopbug.s
new file mode 100755
index 0000000..1aa46c3
--- /dev/null
+++ b/gas/testsuite/gas/hppa/reloc/labelopbug.s
@@ -0,0 +1,37 @@
+ .SPACE $PRIVATE$
+ .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
+ .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
+ .SPACE $TEXT$
+ .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
+ .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
+ .IMPORT $global$,DATA
+ .IMPORT $$dyncall,MILLICODE
+; gcc_compiled.:
+ .SPACE $TEXT$
+ .SUBSPA $CODE$
+
+ .align 4
+s:
+ .PROC
+ .CALLINFO FRAME=128,CALLS,SAVE_RP
+ .ENTRY
+ stw 2,-20(0,30)
+ copy 4,1
+ copy 30,4
+ stwm 1,128(0,30)
+ stw %r30,12(0,%r4)
+ ldil L'L$0007,%r19
+ ldo R'L$0007(%r19),%r19
+ comib,>= 0,%r26,L$0002
+ stw %r19,8(0,%r4)
+L$0003:
+L$0002:
+ bl L$0001,0
+ ldo 1(0),%r28
+L$0007:
+ ldil L'L$0002,%r19
+ ldo R'L$0002(%r19),%r19
+ comb,= %r29,%r19,L$0002
+ ldo -8(%r4),%r4
+ .EXIT
+ .PROCEND
diff --git a/gas/testsuite/gas/hppa/reloc/plabelbug.s b/gas/testsuite/gas/hppa/reloc/plabelbug.s
new file mode 100755
index 0000000..3d6bc12
--- /dev/null
+++ b/gas/testsuite/gas/hppa/reloc/plabelbug.s
@@ -0,0 +1,47 @@
+ .SPACE $PRIVATE$
+ .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
+ .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
+ .SPACE $TEXT$
+ .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
+ .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
+ .IMPORT $global$,DATA
+ .IMPORT $$dyncall,MILLICODE
+; gcc_compiled.:
+ .IMPORT abort,CODE
+ .EXPORT f,DATA
+ .SPACE $PRIVATE$
+ .SUBSPA $DATA$
+
+ .align 4
+f:
+ .word P%abort
+ .word P%abort
+ .IMPORT __main,CODE
+ .IMPORT printf,CODE
+ .SPACE $TEXT$
+ .SUBSPA $CODE$
+
+ .align 4
+LC$0000:
+ .STRING "frob\x0a\x00"
+ .align 4
+ .EXPORT main,CODE
+ .EXPORT main,ENTRY,PRIV_LEV=3,RTNVAL=GR
+main:
+ .PROC
+ .CALLINFO FRAME=128,CALLS,SAVE_RP
+ .ENTRY
+ stw %r2,-20(0,%r30)
+ ldo 128(%r30),%r30
+ .CALL
+ bl __main,2
+ nop
+ ldil L'LC$0000,%r26
+ .CALL ARGW0=GR
+ bl printf,2
+ ldo R'LC$0000(%r26),%r26
+ ldw -148(0,%r30),%r2
+ bv 0(%r2)
+ ldo -128(%r30),%r30
+ .EXIT
+ .PROCEND
diff --git a/gas/testsuite/gas/hppa/reloc/reduce.s b/gas/testsuite/gas/hppa/reloc/reduce.s
new file mode 100755
index 0000000..833791d
--- /dev/null
+++ b/gas/testsuite/gas/hppa/reloc/reduce.s
@@ -0,0 +1,48 @@
+ .SPACE $PRIVATE$
+ .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
+ .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
+ .SPACE $TEXT$
+ .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
+ .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
+ .IMPORT $global$,DATA
+ .IMPORT $$dyncall,MILLICODE
+; gcc_compiled.:
+ .SPACE $TEXT$
+ .SUBSPA $CODE$
+
+ .align 4
+ .PARAM foo,RTNVAL=GR
+foo:
+ .PROC
+ .CALLINFO FRAME=0,NO_CALLS
+ .ENTRY
+ bv,n 0(%r2)
+ .EXIT
+ .PROCEND
+ .SPACE $TEXT$
+ .SUBSPA $LIT$
+
+ .align 4
+LC$0000:
+ .word P%foo
+ .SPACE $TEXT$
+ .SUBSPA $CODE$
+
+ .align 4
+ .EXPORT bar,CODE
+ .EXPORT bar,ENTRY,PRIV_LEV=3,RTNVAL=GR
+bar:
+ .PROC
+ .CALLINFO FRAME=128,CALLS,SAVE_RP
+ .ENTRY
+ ldil L'LC$0000,%r19
+ ldw R'LC$0000(%r19),%r26
+ stw %r2,-20(0,%r30)
+ .CALL ARGW0=GR
+ bl foo,%r2
+ ldo 128(%r30),%r30
+ ldw -148(0,%r30),%r2
+ bv 0(%r2)
+ ldo -128(%r30),%r30
+ .EXIT
+ .PROCEND
diff --git a/gas/testsuite/gas/hppa/reloc/relocreduce.s b/gas/testsuite/gas/hppa/reloc/relocreduce.s
new file mode 100755
index 0000000..833791d
--- /dev/null
+++ b/gas/testsuite/gas/hppa/reloc/relocreduce.s
@@ -0,0 +1,48 @@
+ .SPACE $PRIVATE$
+ .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
+ .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
+ .SPACE $TEXT$
+ .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
+ .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
+ .IMPORT $global$,DATA
+ .IMPORT $$dyncall,MILLICODE
+; gcc_compiled.:
+ .SPACE $TEXT$
+ .SUBSPA $CODE$
+
+ .align 4
+ .PARAM foo,RTNVAL=GR
+foo:
+ .PROC
+ .CALLINFO FRAME=0,NO_CALLS
+ .ENTRY
+ bv,n 0(%r2)
+ .EXIT
+ .PROCEND
+ .SPACE $TEXT$
+ .SUBSPA $LIT$
+
+ .align 4
+LC$0000:
+ .word P%foo
+ .SPACE $TEXT$
+ .SUBSPA $CODE$
+
+ .align 4
+ .EXPORT bar,CODE
+ .EXPORT bar,ENTRY,PRIV_LEV=3,RTNVAL=GR
+bar:
+ .PROC
+ .CALLINFO FRAME=128,CALLS,SAVE_RP
+ .ENTRY
+ ldil L'LC$0000,%r19
+ ldw R'LC$0000(%r19),%r26
+ stw %r2,-20(0,%r30)
+ .CALL ARGW0=GR
+ bl foo,%r2
+ ldo 128(%r30),%r30
+ ldw -148(0,%r30),%r2
+ bv 0(%r2)
+ ldo -128(%r30),%r30
+ .EXIT
+ .PROCEND