aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-12-01 01:13:27 +0000
committerJim Blandy <jimb@codesourcery.com>2001-12-01 01:13:27 +0000
commitcd5195a8910f35a664e2fa98b50642b6eb181f60 (patch)
tree54f00b7d72d7e84f33c263c0a0689d1338181ab9 /gdb/testsuite
parent6ded7999cda94104758893ee6cd00fe17d584ba2 (diff)
downloadgdb-cd5195a8910f35a664e2fa98b50642b6eb181f60.zip
gdb-cd5195a8910f35a664e2fa98b50642b6eb181f60.tar.gz
gdb-cd5195a8910f35a664e2fa98b50642b6eb181f60.tar.bz2
Add assembly-source tests for s390-ibm-linux.
* gdb.asm/s390.inc: New file. * gdb.asm/configure.in, gdb.asm/asm-source.exp: Add clauses for the S/390 architecture. * gdb.asm/configure: Regenerated.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog8
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp3
-rwxr-xr-xgdb/testsuite/gdb.asm/configure28
-rw-r--r--gdb/testsuite/gdb.asm/configure.in1
-rw-r--r--gdb/testsuite/gdb.asm/s390.inc68
5 files changed, 100 insertions, 8 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7808e58..d0a6648 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2001-11-30 Jim Blandy <jimb@redhat.com>
+
+ Add assembly-source tests for s390-ibm-linux.
+ * gdb.asm/s390.inc: New file.
+ * gdb.asm/configure.in, gdb.asm/asm-source.exp: Add clauses for
+ the S/390 architecture.
+ * gdb.asm/configure: Regenerated.
+
2001-11-26 Fernando Nasser <fnasser@redhat.com>
From 2001-11-12 Jackie Smith Cashion <jsmith@redhat.com>:
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index 602d844..8e07692 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -38,6 +38,9 @@ set link-flags ""
if [istarget "d10v-*-*"] then {
set asm-arch d10v
}
+if [istarget "s390-*-*"] then {
+ set asm-arch s390
+}
if [istarget "i\[3456\]86-*-*"] then {
set asm-arch i386
}
diff --git a/gdb/testsuite/gdb.asm/configure b/gdb/testsuite/gdb.asm/configure
index 0da4b49..3219273 100755
--- a/gdb/testsuite/gdb.asm/configure
+++ b/gdb/testsuite/gdb.asm/configure
@@ -28,6 +28,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -142,6 +143,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -312,6 +314,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -477,12 +484,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -571,7 +582,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:575: checking host system type" >&5
+echo "configure:586: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -592,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:596: checking target system type" >&5
+echo "configure:607: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -610,7 +621,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:614: checking build system type" >&5
+echo "configure:625: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -636,6 +647,7 @@ test "$host_alias" != "$target_alias" &&
archinc=common.inc
case ${target} in
d10v-*-*) archinc=d10v.inc ;;
+s390-*-*) archinc=s390.inc ;;
i[3456]86*) archinc=i386.inc ;;
m32r*-*) archinc=m32r.inc ;;
sparc-*-*) archinc=sparc.inc ;;
diff --git a/gdb/testsuite/gdb.asm/configure.in b/gdb/testsuite/gdb.asm/configure.in
index af03134..07fc4c4 100644
--- a/gdb/testsuite/gdb.asm/configure.in
+++ b/gdb/testsuite/gdb.asm/configure.in
@@ -16,6 +16,7 @@ dnl In default case we need to link with some file so use common.inc.
archinc=common.inc
case ${target} in
d10v-*-*) archinc=d10v.inc ;;
+s390-*-*) archinc=s390.inc ;;
i[[3456]]86*) archinc=i386.inc ;;
m32r*-*) archinc=m32r.inc ;;
sparc-*-*) archinc=sparc.inc ;;
diff --git a/gdb/testsuite/gdb.asm/s390.inc b/gdb/testsuite/gdb.asm/s390.inc
new file mode 100644
index 0000000..04be5d6
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/s390.inc
@@ -0,0 +1,68 @@
+### entry point code
+ .macro gdbasm_startup
+
+ # Align the stack pointer to an 8-byte boundary.
+ lhi %r0,-8
+ nr %r15,%r0
+
+ # Reserve space for the standard stack frame:
+ # back chain, and space for the callee to save its registers.
+ ahi %r15,-104
+
+ # Zero this frame's back chain pointer.
+ xc 0(4,%r15),0(%r15)
+ .endm
+
+
+### Call a function.
+ .macro gdbasm_call subr
+
+ # Put the address of the constant in %r1, load the constant
+ # (SUBR's address), and jump to it.
+ bras %r1, .Lafterconst\@
+ .long \subr
+.Lafterconst\@:
+ l %r1,0(%r1)
+ basr %r14,%r1
+ .endm
+
+
+### Exit with a zero status.
+ .macro gdbasm_exit0
+ lhi %r2, 0
+ svc 1
+ .endm
+
+### Standard subroutine prologue.
+ .macro gdbasm_enter
+
+ # Save all the callee-saves registers. What the heck.
+ stm %r6,%r15,24(%r15)
+
+ # Allocate the stack frame, and write the back chain pointer.
+ # Keep the original SP in %r11.
+ lr %r1,%r15
+ ahi %r15,-96
+ st %r1,0(%r15)
+ .endm
+
+
+### Standard subroutine epilogue.
+ .macro gdbasm_leave
+
+ # Restore all our registers. This also pops the frame, and
+ # restores our return address.
+ lm %r6,%r15,120(%r15)
+
+ # Jump to the return address.
+ br %r14
+
+ .endm
+
+### Several nops.
+ .macro gdbasm_several_nops
+ lr %r0, %r0
+ lr %r0, %r0
+ lr %r0, %r0
+ lr %r0, %r0
+ .endm