mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-14 15:50:34 +00:00
Relocation tests for the PA.
This commit is contained in:
parent
7b5b8e5117
commit
9b1b0ad1a6
40
gas/testsuite/gas/hppa/reloc/.Sanitize
Normal file
40
gas/testsuite/gas/hppa/reloc/.Sanitize
Normal file
@ -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.
|
16
gas/testsuite/gas/hppa/reloc/blebug.s
Executable file
16
gas/testsuite/gas/hppa/reloc/blebug.s
Executable file
@ -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)
|
14
gas/testsuite/gas/hppa/reloc/blebug2.s
Executable file
14
gas/testsuite/gas/hppa/reloc/blebug2.s
Executable file
@ -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)
|
37
gas/testsuite/gas/hppa/reloc/labelopbug.s
Executable file
37
gas/testsuite/gas/hppa/reloc/labelopbug.s
Executable file
@ -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
|
47
gas/testsuite/gas/hppa/reloc/plabelbug.s
Executable file
47
gas/testsuite/gas/hppa/reloc/plabelbug.s
Executable file
@ -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
|
48
gas/testsuite/gas/hppa/reloc/reduce.s
Executable file
48
gas/testsuite/gas/hppa/reloc/reduce.s
Executable file
@ -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
|
48
gas/testsuite/gas/hppa/reloc/relocreduce.s
Executable file
48
gas/testsuite/gas/hppa/reloc/relocreduce.s
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user