diff options
54 files changed, 8119 insertions, 967 deletions
@@ -1,3 +1,8 @@ +2000-02-23 Linas Vepstas <linas@linas.org> + + * config.sub: Add support for Linux/IBM 370. + * configure.in: Likewise. + 2000-02-22 Nick Clifton <nickc@cygnus.com> * configure.in: Add mips-pe, sh-pe and arm-wince-pe targets. diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5d4d4a2..6613b47 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,26 @@ +2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au> + + * bfd-in.h: Update copyright date. + +2000-02-23 Linas Vepstas <linas@linas.org> + + * cpu-i370.c: New file. + * elf32-i370.c: New file. + * archures.c (enum bfd_architecture): Add bfd_arch_i370. + (bfd_i370_arch): New. + (bfd_archures_list): Add bfd_i370_arch. + * elf.c (prep_headers): Add bfd_arch_i370. + * Makefile.am: Add support for IBM 370 elf. + * config.bfd: Likewise. + * configure.in: Likewise. + * libbfd.h (bfd_reloc_code_real_names): Likewise. + * reloc.c (bfd_reloc_code_type): Likewise. + * targets.c: Likewise. + + * Makefile.in: Regenerate. + * configure: Regenerate. + * bfd-in2.h: Regenerate. + 2000-02-22 Ian Lance Taylor <ian@zembu.com> * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 22fb255..f014439 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -47,6 +47,7 @@ ALL_MACHINES = \ cpu-h8300.lo \ cpu-h8500.lo \ cpu-hppa.lo \ + cpu-i370.lo \ cpu-i386.lo \ cpu-i860.lo \ cpu-i960.lo \ @@ -82,6 +83,7 @@ ALL_MACHINES_CFILES = \ cpu-h8300.c \ cpu-h8500.c \ cpu-hppa.c \ + cpu-i370.c \ cpu-i386.c \ cpu-i860.c \ cpu-i960.c \ @@ -159,6 +161,7 @@ BFD32_BACKENDS = \ elf32-d30v.lo \ elf32-fr30.lo \ elf32-gen.lo \ + elf32-i370.lo \ elf32-i386.lo \ elf32-i860.lo \ elf32-i960.lo \ @@ -283,6 +286,7 @@ BFD32_BACKENDS_CFILES = \ elf32-d30v.c \ elf32-fr30.c \ elf32-gen.c \ + elf32-i370.c \ elf32-i386.c \ elf32-i860.c \ elf32-i960.c \ @@ -850,6 +854,9 @@ elf32-fr30.lo: elf32-fr30.c elf-bfd.h $(INCDIR)/elf/common.h \ elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ elf32-target.h +elf32-i370.lo: elf32-i370.c elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + elf32-target.h elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 31dc267..73315b4 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -164,6 +164,7 @@ ALL_MACHINES = \ cpu-h8300.lo \ cpu-h8500.lo \ cpu-hppa.lo \ + cpu-i370.lo \ cpu-i386.lo \ cpu-i860.lo \ cpu-i960.lo \ @@ -200,6 +201,7 @@ ALL_MACHINES_CFILES = \ cpu-h8300.c \ cpu-h8500.c \ cpu-hppa.c \ + cpu-i370.c \ cpu-i386.c \ cpu-i860.c \ cpu-i960.c \ @@ -278,6 +280,7 @@ BFD32_BACKENDS = \ elf32-d30v.lo \ elf32-fr30.lo \ elf32-gen.lo \ + elf32-i370.lo \ elf32-i386.lo \ elf32-i860.lo \ elf32-i960.lo \ @@ -403,6 +406,7 @@ BFD32_BACKENDS_CFILES = \ elf32-d30v.c \ elf32-fr30.c \ elf32-gen.c \ + elf32-i370.c \ elf32-i386.c \ elf32-i860.c \ elf32-i960.c \ @@ -1380,6 +1384,9 @@ elf32-fr30.lo: elf32-fr30.c elf-bfd.h $(INCDIR)/elf/common.h \ elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ elf32-target.h +elf32-i370.lo: elf32-i370.c elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + elf32-target.h elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h diff --git a/bfd/archures.c b/bfd/archures.c index 21e980e..483f649 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -135,6 +135,7 @@ DESCRIPTION . bfd_arch_we32k, {* AT&T WE32xxx *} . bfd_arch_tahoe, {* CCI/Harris Tahoe *} . bfd_arch_i860, {* Intel 860 *} +. bfd_arch_i370, {* IBM 360/370 Mainframes *} . bfd_arch_romp, {* IBM ROMP PC/RT *} . bfd_arch_alliant, {* Alliant *} . bfd_arch_convex, {* Convex *} @@ -245,6 +246,7 @@ extern const bfd_arch_info_type bfd_d30v_arch; extern const bfd_arch_info_type bfd_h8300_arch; extern const bfd_arch_info_type bfd_h8500_arch; extern const bfd_arch_info_type bfd_hppa_arch; +extern const bfd_arch_info_type bfd_i370_arch; extern const bfd_arch_info_type bfd_i386_arch; extern const bfd_arch_info_type bfd_i860_arch; extern const bfd_arch_info_type bfd_i960_arch; @@ -284,6 +286,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_h8300_arch, &bfd_h8500_arch, &bfd_hppa_arch, + &bfd_i370_arch, &bfd_i386_arch, &bfd_i860_arch, &bfd_i960_arch, diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index a5312f4..15aa3a6 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -1,5 +1,5 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Contributed by Cygnus Support. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 99bc67f..519ad86 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1,5 +1,5 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -1341,6 +1341,7 @@ enum bfd_architecture bfd_arch_we32k, /* AT&T WE32xxx */ bfd_arch_tahoe, /* CCI/Harris Tahoe */ bfd_arch_i860, /* Intel 860 */ + bfd_arch_i370, /* IBM 360/370 Mainframes */ bfd_arch_romp, /* IBM ROMP PC/RT */ bfd_arch_alliant, /* Alliant */ bfd_arch_convex, /* Convex */ @@ -1997,6 +1998,9 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_PPC_EMB_BIT_FLD, BFD_RELOC_PPC_EMB_RELSDA, +/* IBM 370/390 relocations */ + BFD_RELOC_I370_D12, + /* The type of reloc used to build a contructor table - at the moment probably a 32 bit wide absolute relocation, but the target can choose. It generally does map to one of the other relocation types. */ diff --git a/bfd/config.bfd b/bfd/config.bfd index 65710b4..ff5249b 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -35,6 +35,7 @@ thumb*) targ_archs=bfd_arm_arch ;; c30*) targ_archs=bfd_tic30_arch ;; hppa*) targ_archs=bfd_hppa_arch ;; i[3456]86) targ_archs=bfd_i386_arch ;; +i370) targ_archs=bfd_i370_arch ;; m68*) targ_archs=bfd_m68k_arch ;; m88*) targ_archs=bfd_m88k_arch ;; mips*) targ_archs=bfd_mips_arch ;; @@ -221,6 +222,10 @@ case "${targ}" in #endif #endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */ + i370-*-*) + targ_defvec=bfd_elf32_i370_vec + targ_selvecs="bfd_elf32_i370_vec" + ;; i[3456]86-*-sco3.2v5*coff) targ_defvec=i386coff_vec targ_selvecs=bfd_elf32_i386_vec diff --git a/bfd/configure b/bfd/configure index c1736f9..62c7927 100755 --- a/bfd/configure +++ b/bfd/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.13.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -53,7 +53,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -168,7 +167,6 @@ 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 @@ -339,11 +337,6 @@ 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=*) @@ -365,7 +358,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.13.1" exit 0 ;; -with-* | --with-*) @@ -509,16 +502,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -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 +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 -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -529,7 +518,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -573,9 +562,130 @@ done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:572: checking host system type" >&5 +if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_host_alias=$host + case "$ac_cv_host_alias" in + NONE) + case $nonopt in + NONE) + if ac_cv_host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) ac_cv_host_alias=$nonopt ;; + esac ;; + esac + + ac_cv_host=`$ac_config_sub $ac_cv_host_alias` + ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_host" 1>&6 + +host=$ac_cv_host +host_alias=$ac_cv_host_alias +host_cpu=$ac_cv_host_cpu +host_vendor=$ac_cv_host_vendor +host_os=$ac_cv_host_os + + + + + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:613: checking target system type" >&5 +if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_target_alias=$target + case "$ac_cv_target_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_target_alias=$host_alias ;; + + *) ac_cv_target_alias=$nonopt ;; + esac ;; + esac + + ac_cv_target=`$ac_config_sub $ac_cv_target_alias` + ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_target" 1>&6 + +target=$ac_cv_target +target_alias=$ac_cv_target_alias +target_cpu=$ac_cv_target_cpu +target_vendor=$ac_cv_target_vendor +target_os=$ac_cv_target_os + + + + + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:653: checking build system type" >&5 +if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_build_alias=$build + case "$ac_cv_build_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_build_alias=$host_alias ;; + + *) ac_cv_build_alias=$nonopt ;; + esac ;; + esac + + ac_cv_build=`$ac_config_sub $ac_cv_build_alias` + ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_build" 1>&6 + +build=$ac_cv_build +build_alias=$ac_cv_build_alias +build_cpu=$ac_cv_build_cpu +build_vendor=$ac_cv_build_vendor +build_os=$ac_cv_build_os + + + # Do some error checking and defaulting for the host and target type. @@ -598,69 +708,6 @@ NONE---*---* | *---NONE---* | *---*---NONE) ;; *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; esac - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -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:609: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -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:630: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -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:648: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && @@ -669,8 +716,8 @@ test "$host_alias" != "$target_alias" && # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:673: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:720: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -699,8 +746,8 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:703: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:750: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -746,12 +793,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:754: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:801: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -781,8 +828,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:786: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:833: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -793,12 +840,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 797 "configure" +#line 844 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -823,14 +870,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:828: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:875: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:833: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:880: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF @@ -838,7 +885,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -857,8 +904,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:861: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:908: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -889,7 +936,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:893: checking for POSIXized ISC" >&5 +echo "configure:940: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -922,9 +969,9 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:926: checking for a BSD compatible install" >&5 +echo "configure:973: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -942,6 +989,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -970,12 +1021,12 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:979: checking whether build environment is sane" >&5 +echo "configure:1030: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1023,18 +1074,18 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1036: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1087: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF @@ -1078,7 +1129,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1082: checking for working aclocal" >&5 +echo "configure:1133: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1091,7 +1142,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1095: checking for working autoconf" >&5 +echo "configure:1146: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1104,7 +1155,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1108: checking for working automake" >&5 +echo "configure:1159: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1117,7 +1168,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1121: checking for working autoheader" >&5 +echo "configure:1172: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1130,7 +1181,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1134: checking for working makeinfo" >&5 +echo "configure:1185: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1153,8 +1204,8 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1157: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then +echo "configure:1208: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then @@ -1185,8 +1236,8 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1189: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1240: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1217,8 +1268,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1221: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1272: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1323,8 +1374,8 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1327: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1378: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1362,7 +1413,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1366: checking for ld used by GCC" >&5 +echo "configure:1417: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1386,12 +1437,12 @@ echo "configure:1366: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1390: checking for GNU ld" >&5 +echo "configure:1441: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1393: checking for non-GNU ld" >&5 +echo "configure:1444: checking for non-GNU ld" >&5 fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then @@ -1425,8 +1476,8 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1429: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then +echo "configure:1480: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -1441,8 +1492,8 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1445: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then +echo "configure:1496: checking for BSD-compatible nm" >&5 +if eval "test \"\${ac_cv_path_NM+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then @@ -1479,8 +1530,8 @@ echo "$ac_t""$NM" 1>&6 # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 -echo "configure:1483: checking command to parse $NM output" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then +echo "configure:1534: checking command to parse $NM output" >&5 +if eval "test \"\${ac_cv_sys_global_symbol_pipe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # These are sane defaults that work on at least a few old systems. @@ -1542,11 +1593,11 @@ void nm_test_func(){} int main(){nm_test_var='a';nm_test_func;return 0;} EOF - if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1550: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1601: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # Try sorting and uniquifying the output. if sort "$ac_nlist" | uniq > "$ac_nlist"T; then @@ -1598,7 +1649,7 @@ EOF ac_save_CFLAGS="$CFLAGS" LIBS="conftestm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_pipe_works=yes else echo "configure: failed program was:" >&5 @@ -1644,8 +1695,8 @@ fi echo "$ac_t""$ac_result" 1>&6 echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6 -echo "configure:1648: checking for _ prefix in compiled symbols" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then +echo "configure:1699: checking for _ prefix in compiled symbols" >&5 +if eval "test \"\${ac_cv_sys_symbol_underscore+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_sys_symbol_underscore=no @@ -1653,10 +1704,10 @@ cat > conftest.$ac_ext <<EOF void nm_test_func(){} int main(){nm_test_func;return 0;} EOF -if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1660: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1711: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes @@ -1682,8 +1733,8 @@ echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no} echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1686: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +echo "configure:1737: checking whether ln -s works" >&5 +if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata @@ -1718,8 +1769,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1722 "configure"' > conftest.$ac_ext - if { (eval echo configure:1723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1773 "configure"' > conftest.$ac_ext + if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1740,19 +1791,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1744: checking whether the C compiler needs -belf" >&5 -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then +echo "configure:1795: checking whether the C compiler needs -belf" >&5 +if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1749 "configure" +#line 1800 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1775,8 +1826,8 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1779: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then +echo "configure:1830: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1807,8 +1858,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1811: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then +echo "configure:1862: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1842,8 +1893,8 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1846: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then +echo "configure:1897: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1874,8 +1925,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1878: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then +echo "configure:1929: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1987,7 +2038,7 @@ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -2065,17 +2116,17 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2079: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2130: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2098,12 +2149,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:2102: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then +echo "configure:2153: checking for Cygwin environment" >&5 +if eval "test \"\${ac_cv_cygwin+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2107 "configure" +#line 2158 "configure" #include "confdefs.h" int main() { @@ -2114,7 +2165,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:2118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -2124,26 +2175,25 @@ else ac_cv_cygwin=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:2135: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then +echo "configure:2185: checking for mingw32 environment" >&5 +if eval "test \"\${ac_cv_mingw32+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2140 "configure" +#line 2190 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -2153,29 +2203,57 @@ else ac_cv_mingw32=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes +echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6 +echo "configure:2213: checking for EMX OS/2 environment" >&5 +if eval "test \"\${ac_cv_emxos2+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2218 "configure" +#include "confdefs.h" + +int main() { +return __EMX__; +; return 0; } +EOF +if { (eval echo configure:2225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_emxos2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_emxos2=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_emxos2" 1>&6 +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2166: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then +echo "configure:2244: checking for executable suffix" >&5 +if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then ac_cv_exeext=.exe else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.C | *.o | *.obj | *.xcoff) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2201,8 +2279,8 @@ target64=false # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2205: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2283: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2231,8 +2309,8 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2235: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2313: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2278,12 +2356,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2286: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2364: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2313,8 +2391,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2318: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:2396: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2325,12 +2403,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2329 "configure" +#line 2407 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2355,14 +2433,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2360: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:2438: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2365: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:2443: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF @@ -2370,7 +2448,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2389,8 +2467,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2393: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:2471: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -2423,13 +2501,13 @@ fi ALL_LINGUAS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2427: checking how to run the C preprocessor" >&5 +echo "configure:2505: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -2438,13 +2516,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2442 "configure" +#line 2520 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2455,13 +2533,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2459 "configure" +#line 2537 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2472,13 +2550,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2476 "configure" +#line 2554 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2503,12 +2581,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2507: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then +echo "configure:2585: checking for ANSI C header files" >&5 +if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2512 "configure" +#line 2590 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2516,7 +2594,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2533,7 +2611,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2537 "configure" +#line 2615 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2551,7 +2629,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2555 "configure" +#line 2633 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2572,7 +2650,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2576 "configure" +#line 2654 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2583,7 +2661,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2607,12 +2685,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2611: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then +echo "configure:2689: checking for working const" >&5 +if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2616 "configure" +#line 2694 "configure" #include "confdefs.h" int main() { @@ -2661,7 +2739,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2682,21 +2760,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2686: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then +echo "configure:2764: checking for inline" >&5 +if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 2693 "configure" +#line 2771 "configure" #include "confdefs.h" int main() { -} $ac_kw foo() { +} $ac_kw int foo() { ; return 0; } EOF -if { (eval echo configure:2700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2722,12 +2800,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2726: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then +echo "configure:2804: checking for off_t" >&5 +if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2731 "configure" +#line 2809 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2738,29 +2816,31 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_off_t=yes + eval "ac_cv_type_off_t=yes" else rm -rf conftest* - ac_cv_type_off_t=no + eval "ac_cv_type_off_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<EOF #define off_t long EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2759: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +echo "configure:2839: checking for size_t" >&5 +if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2764 "configure" +#line 2844 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2771,17 +2851,19 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_size_t=yes + eval "ac_cv_type_size_t=yes" else rm -rf conftest* - ac_cv_type_size_t=no + eval "ac_cv_type_size_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<EOF #define size_t unsigned EOF @@ -2790,19 +2872,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2794: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then +echo "configure:2876: checking for working alloca.h" >&5 +if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2799 "configure" +#line 2881 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2823,12 +2905,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2827: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then +echo "configure:2909: checking for alloca" >&5 +if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2832 "configure" +#line 2914 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -2856,7 +2938,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:2860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2888,12 +2970,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2892: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then +echo "configure:2974: checking whether alloca needs Cray hooks" >&5 +if eval "test \"\${ac_cv_os_cray+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2897 "configure" +#line 2979 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2918,12 +3000,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2922: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3004: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2927 "configure" +#line 3009 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2932,6 +3014,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -2941,12 +3024,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2973,15 +3056,15 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2977: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then +echo "configure:3060: checking stack direction for C alloca" >&5 +if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2985 "configure" +#line 3068 "configure" #include "confdefs.h" find_stack_direction () { @@ -3000,7 +3083,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3025,17 +3108,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3029: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3112: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3034 "configure" +#line 3117 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3064,12 +3147,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3068: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3151: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3073 "configure" +#line 3156 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3078,6 +3161,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3087,12 +3171,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3117,15 +3201,15 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3121: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +echo "configure:3205: checking for working mmap" >&5 +if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3129 "configure" +#line 3213 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3265,7 +3349,7 @@ main() } EOF -if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3293,17 +3377,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3297: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3381: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3302 "configure" +#line 3386 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3333,12 +3417,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3337: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3421: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3342 "configure" +#line 3426 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3347,6 +3431,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3356,12 +3441,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3390,12 +3475,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3394: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3479: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3399 "configure" +#line 3484 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3404,6 +3489,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3413,12 +3499,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3452,19 +3538,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3456: checking for LC_MESSAGES" >&5 -if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then +echo "configure:3542: checking for LC_MESSAGES" >&5 +if eval "test \"\${am_cv_val_LC_MESSAGES+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3461 "configure" +#line 3547 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3485,7 +3571,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3489: checking whether NLS is requested" >&5 +echo "configure:3575: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3505,7 +3591,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3509: checking whether included gettext is requested" >&5 +echo "configure:3595: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3524,17 +3610,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3528: checking for libintl.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3614: checking for libintl.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3533 "configure" +#line 3619 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3551,19 +3637,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3555: checking for gettext in libc" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then +echo "configure:3641: checking for gettext in libc" >&5 +if eval "test \"\${gt_cv_func_gettext_libc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3560 "configure" +#line 3646 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3579,15 +3665,15 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3583: checking for bindtextdomain in -lintl" >&5 -ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:3669: checking for bindtextdomain in -lintl" >&5 +ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3591 "configure" +#line 3677 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3598,7 +3684,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3614,19 +3700,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3618: checking for gettext in libintl" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then +echo "configure:3704: checking for gettext in libintl" >&5 +if eval "test \"\${gt_cv_func_gettext_libintl+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3623 "configure" +#line 3709 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3654,8 +3740,8 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3658: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:3744: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3688,12 +3774,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3692: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3778: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3697 "configure" +#line 3783 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3702,6 +3788,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3711,12 +3798,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3743,8 +3830,8 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3747: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:3834: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -3779,8 +3866,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3783: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:3870: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -3811,7 +3898,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 3815 "configure" +#line 3902 "configure" #include "confdefs.h" int main() { @@ -3819,7 +3906,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3851,8 +3938,8 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3855: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:3942: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3885,8 +3972,8 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3889: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:3976: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -3921,8 +4008,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3925: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:4012: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -4011,7 +4098,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4015: checking for catalogs to be installed" >&5 +echo "configure:4102: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4039,17 +4126,17 @@ echo "configure:4015: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4043: checking for linux/version.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4130: checking for linux/version.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4048 "configure" +#line 4135 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4127,9 +4214,9 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:4131: checking for a BSD compatible install" >&5 +echo "configure:4218: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -4147,6 +4234,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -4175,7 +4266,7 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' @@ -4210,8 +4301,8 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4214: checking for build system executable suffix" >&5 -if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then +echo "configure:4305: checking for build system executable suffix" >&5 +if eval "test \"\${bfd_cv_build_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* @@ -4238,17 +4329,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4242: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4333: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4247 "configure" +#line 4338 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4278,17 +4369,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4282: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4373: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4287 "configure" +#line 4378 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4315,12 +4406,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4319: checking whether time.h and sys/time.h may both be included" >&5 -if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then +echo "configure:4410: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"\${ac_cv_header_time+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4324 "configure" +#line 4415 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -4329,7 +4420,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4354,12 +4445,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4358: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then +echo "configure:4449: checking for $ac_hdr that defines DIR" >&5 +if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4363 "configure" +#line 4454 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -4367,7 +4458,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4392,15 +4483,15 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4396: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:4487: checking for opendir in -ldir" >&5 +ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 4404 "configure" +#line 4495 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4411,7 +4502,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4433,15 +4524,15 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4437: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:4528: checking for opendir in -lx" >&5 +ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 4445 "configure" +#line 4536 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4452,7 +4543,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4477,12 +4568,12 @@ fi for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4481: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:4572: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4486 "configure" +#line 4577 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4491,6 +4582,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -4500,12 +4592,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4540,12 +4632,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4544: checking whether strstr must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then +echo "configure:4636: checking whether strstr must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_strstr+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4549 "configure" +#line 4641 "configure" #include "confdefs.h" #include <stdio.h> @@ -4566,7 +4658,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4587,12 +4679,12 @@ EOF fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:4591: checking whether malloc must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then +echo "configure:4683: checking whether malloc must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_malloc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4596 "configure" +#line 4688 "configure" #include "confdefs.h" #include <stdio.h> @@ -4613,7 +4705,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -4634,12 +4726,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:4638: checking whether realloc must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then +echo "configure:4730: checking whether realloc must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_realloc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4643 "configure" +#line 4735 "configure" #include "confdefs.h" #include <stdio.h> @@ -4660,7 +4752,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -4681,12 +4773,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4685: checking whether free must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then +echo "configure:4777: checking whether free must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_free+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4690 "configure" +#line 4782 "configure" #include "confdefs.h" #include <stdio.h> @@ -4707,7 +4799,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4728,12 +4820,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4732: checking whether getenv must be declared" >&5 -if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then +echo "configure:4824: checking whether getenv must be declared" >&5 +if eval "test \"\${bfd_cv_decl_needed_getenv+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4737 "configure" +#line 4829 "configure" #include "confdefs.h" #include <stdio.h> @@ -4754,7 +4846,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -4793,8 +4885,13 @@ if test "${target}" = "${host}"; then hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; + i370-*-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i370linux.h"' + ;; + i[3456]86-sequent-bsd*) - COREFILE=trad-core.lo; + COREFILE=trad-core.lo TRAD_HEADER='"hosts/symmetry.h"' ;; i[3456]86-sequent-sysv4*) ;; @@ -4955,17 +5052,17 @@ if test "${target}" = "${host}"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4959: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:5056: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4964 "configure" +#line 5061 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4993,19 +5090,19 @@ done if test "$ac_cv_header_sys_procfs_h" = yes; then echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:4997: checking for prstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then +echo "configure:5094: checking for prstatus_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_prstatus_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5002 "configure" +#line 5099 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { prstatus_t avar ; return 0; } EOF -if { (eval echo configure:5009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5027,19 +5124,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5031: checking for prstatus_t.pr_who in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then +echo "configure:5128: checking for prstatus_t.pr_who in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5036 "configure" +#line 5133 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { prstatus_t avar; void* aref = (void*) &avar.pr_who ; return 0; } EOF -if { (eval echo configure:5043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else @@ -5061,19 +5158,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5065: checking for pstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then +echo "configure:5162: checking for pstatus_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_pstatus_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5070 "configure" +#line 5167 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5095,19 +5192,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5099: checking for prpsinfo_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then +echo "configure:5196: checking for prpsinfo_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5104 "configure" +#line 5201 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { prpsinfo_t avar ; return 0; } EOF -if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5129,19 +5226,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5133: checking for psinfo_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then +echo "configure:5230: checking for psinfo_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_psinfo_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5138 "configure" +#line 5235 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { psinfo_t avar ; return 0; } EOF -if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5163,19 +5260,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5167: checking for lwpstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then +echo "configure:5264: checking for lwpstatus_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5172 "configure" +#line 5269 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { lwpstatus_t avar ; return 0; } EOF -if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5197,19 +5294,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5201: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then +echo "configure:5298: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5206 "configure" +#line 5303 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_context ; return 0; } EOF -if { (eval echo configure:5213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else @@ -5231,19 +5328,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5235: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then +echo "configure:5332: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5240 "configure" +#line 5337 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_reg ; return 0; } EOF -if { (eval echo configure:5247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else @@ -5265,19 +5362,19 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5269: checking for win32_pstatus_t in sys/procfs.h" >&5 - if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then +echo "configure:5366: checking for win32_pstatus_t in sys/procfs.h" >&5 + if eval "test \"\${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5274 "configure" +#line 5371 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { win32_pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -5433,6 +5530,7 @@ do bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; @@ -5631,17 +5729,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5635: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:5733: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5640 "configure" +#line 5738 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5670,12 +5768,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5674: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:5772: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5679 "configure" +#line 5777 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5684,6 +5782,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -5693,12 +5792,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:5702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5723,15 +5822,15 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:5727: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +echo "configure:5826: checking for working mmap" >&5 +if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 5735 "configure" +#line 5834 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -5871,7 +5970,7 @@ main() } EOF -if { (eval echo configure:5875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -5896,12 +5995,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5900: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:5999: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5905 "configure" +#line 6004 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5910,6 +6009,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -5919,12 +6019,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6046,7 +6146,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.13.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -6387,5 +6487,5 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 diff --git a/bfd/configure.in b/bfd/configure.in index 88d3731..092d97c 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -126,10 +126,15 @@ if test "${target}" = "${host}"; then hppa*-*-mpeix*) COREFILE=hpux-core.lo ;; hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo" COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;; + i370-*-*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/i370linux.h"' + ;; + changequote(,)dnl i[3456]86-sequent-bsd*) changequote([,])dnl - COREFILE=trad-core.lo; + COREFILE=trad-core.lo TRAD_HEADER='"hosts/symmetry.h"' ;; changequote(,)dnl @@ -448,6 +453,7 @@ do bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; diff --git a/bfd/cpu-i370.c b/bfd/cpu-i370.c new file mode 100644 index 0000000..2331eef --- /dev/null +++ b/bfd/cpu-i370.c @@ -0,0 +1,94 @@ +/* BFD i370 CPU definition + Copyright (C) 1994, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. + Contributed by Ian Lance Taylor, Cygnus Support. + Hacked by Linas Vepstas <linas@linas.org> in 1998, 1999 + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" + +/* The common i360/370 architecture comes in many forms */ + +static const bfd_arch_info_type *i370_compatible + PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *)); + +static const bfd_arch_info_type * +i370_compatible (a, b) + const bfd_arch_info_type *a; + const bfd_arch_info_type *b; +{ + BFD_ASSERT (a->arch == bfd_arch_i370); + switch (b->arch) + { + default: + return NULL; + case bfd_arch_i370: + return bfd_default_compatible (a, b); + } + /*NOTREACHED*/ +} + +static const bfd_arch_info_type arch_info_struct[] = +{ + /* hack alert: old old machines are really 16 and 24 bit arch ... */ + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i370, + 360, /* for the 360 */ + "i370", + "i370:360", + 3, + false, /* not the default */ + i370_compatible, + bfd_default_scan, + &arch_info_struct[1] + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i370, + 370, /* for the 370 */ + "i370", + "i370:370", + 3, + false, /* not the default */ + i370_compatible, + bfd_default_scan, + 0 + }, +}; + +const bfd_arch_info_type bfd_i370_arch = + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i370, + 0, /* for the 360/370 common architecture */ + "i370", + "i370:common", + 3, + true, /* the default */ + i370_compatible, + bfd_default_scan, + &arch_info_struct[0] + }; @@ -1,5 +1,5 @@ /* ELF executable support for BFD. - Copyright 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1993, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -3231,6 +3231,9 @@ prep_headers (abfd) else i_ehdrp->e_machine = EM_SPARC; break; + case bfd_arch_i370: + i_ehdrp->e_machine = EM_S370; + break; case bfd_arch_i386: i_ehdrp->e_machine = EM_386; break; diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c new file mode 100644 index 0000000..6dc993d --- /dev/null +++ b/bfd/elf32-i370.c @@ -0,0 +1,1745 @@ +/* i370-specific support for 32-bit ELF + Copyright 1994, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. + Written by Ian Lance Taylor, Cygnus Support. + Hacked by Linas Vepstas for i370 linas@linas.org + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + + + +/* This file is based on a preliminary PowerPC ELF ABI. + But its been hacked on for the IBM 360/370 architectures. + Basically, the 31bit relocation works, and just about everything + else is a wild card. In particular, don't expect shared libs or + dynamic loading to work ... its never been tested ... +*/ + + +#include "bfd.h" +#include "sysdep.h" +#include "bfdlink.h" +#include "libbfd.h" +#include "elf-bfd.h" +#include "elf/i370.h" + +#define USE_RELA /* we want RELA relocations, not REL */ + +/* i370 relocations */ +/* Note that there is really just one relocation that we currently + * support (and only one that we seem to need, at the moment), and + * that is the 31-bit address relocation. Note that the 370/390 + * only supports a 31-bit (2GB) address space. + */ +enum i370_reloc_type +{ + R_I370_NONE = 0, + R_I370_ADDR31 = 1, + R_I370_ADDR32 = 2, + R_I370_ADDR16 = 3, + R_I370_REL31 = 4, + R_I370_REL32 = 5, + R_I370_ADDR12 = 6, + R_I370_REL12 = 7, + R_I370_ADDR8 = 8, + R_I370_REL8 = 9, + R_I370_COPY = 10, + R_I370_RELATIVE = 11, + + R_I370_max +}; + + +static reloc_howto_type *i370_elf_howto_table[ (int)R_I370_max ]; + +static reloc_howto_type i370_elf_howto_raw[] = +{ + /* This reloc does nothing. */ + HOWTO (R_I370_NONE, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_NONE", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + + /* A standard 31 bit relocation. */ + HOWTO (R_I370_ADDR31, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 31, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR31", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0x7fffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A standard 32 bit relocation. */ + HOWTO (R_I370_ADDR32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR32", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A standard 16 bit relocation. */ + HOWTO (R_I370_ADDR16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR16", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* 31-bit PC relative */ + HOWTO (R_I370_REL31, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 31, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_REL31", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0x7fffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* 32-bit PC relative */ + HOWTO (R_I370_REL32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_REL32", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A standard 12 bit relocation. */ + HOWTO (R_I370_ADDR12, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 12, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR12", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xfff, /* dst_mask */ + false), /* pcrel_offset */ + + /* 12-bit PC relative */ + HOWTO (R_I370_REL12, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 12, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_REL12", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xfff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A standard 8 bit relocation. */ + HOWTO (R_I370_ADDR8, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_ADDR8", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xff, /* dst_mask */ + false), /* pcrel_offset */ + + /* 8-bit PC relative */ + HOWTO (R_I370_REL8, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_REL8", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xff, /* dst_mask */ + true), /* pcrel_offset */ + + /* This is used only by the dynamic linker. The symbol should exist + both in the object being run and in some shared library. The + dynamic linker copies the data addressed by the symbol from the + shared library into the object, because the object being + run has to have the data at some particular address. */ + HOWTO (R_I370_COPY, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_COPY", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + + /* Used only by the dynamic linker. When the object is run, this + longword is set to the load address of the object, plus the + addend. */ + HOWTO (R_I370_RELATIVE, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_I370_RELATIVE", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + +}; + + +static void i370_elf_howto_init PARAMS ((void)); +static void i370_elf_info_to_howto PARAMS ((bfd *abfd, arelent *cache_ptr, + Elf32_Internal_Rela *dst)); +static boolean i370_elf_set_private_flags PARAMS ((bfd *, flagword)); + + +/* Initialize the i370_elf_howto_table, so that linear accesses can be done. */ + +static void +i370_elf_howto_init () +{ + unsigned int i, type; + + for (i = 0; i < sizeof (i370_elf_howto_raw) / sizeof (i370_elf_howto_raw[0]); i++) + { + type = i370_elf_howto_raw[i].type; + BFD_ASSERT (type < sizeof(i370_elf_howto_table) / sizeof(i370_elf_howto_table[0])); + i370_elf_howto_table[type] = &i370_elf_howto_raw[i]; + } +} + + +static reloc_howto_type * +i370_elf_reloc_type_lookup (abfd, code) + bfd *abfd; + bfd_reloc_code_real_type code; +{ + enum i370_reloc_type i370_reloc = R_I370_NONE; + + if (!i370_elf_howto_table[ R_I370_ADDR31 ]) /* Initialize howto table if needed */ + i370_elf_howto_init (); + + switch ((int)code) + { + default: + return (reloc_howto_type *)NULL; + + case BFD_RELOC_NONE: i370_reloc = R_I370_NONE; break; + case BFD_RELOC_32: i370_reloc = R_I370_ADDR31; break; + case BFD_RELOC_16: i370_reloc = R_I370_ADDR16; break; + case BFD_RELOC_32_PCREL: i370_reloc = R_I370_REL31; break; + case BFD_RELOC_CTOR: i370_reloc = R_I370_ADDR31; break; + case BFD_RELOC_I370_D12: i370_reloc = R_I370_ADDR12; break; + } + + return i370_elf_howto_table[ (int)i370_reloc ]; +}; + +static boolean i370_elf_copy_private_bfd_data PARAMS ((bfd *, bfd *)); +static boolean i370_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *)); + +static boolean i370_elf_relocate_section PARAMS ((bfd *, + struct bfd_link_info *info, + bfd *, + asection *, + bfd_byte *, + Elf_Internal_Rela *relocs, + Elf_Internal_Sym *local_syms, + asection **)); + +static boolean i370_elf_create_dynamic_sections PARAMS ((bfd *, + struct bfd_link_info *)); + +static boolean i370_elf_section_from_shdr PARAMS ((bfd *, + Elf32_Internal_Shdr *, + char *)); +static boolean i370_elf_fake_sections PARAMS ((bfd *, + Elf32_Internal_Shdr *, + asection *)); + +static elf_linker_section_t *i370_elf_create_linker_section + PARAMS ((bfd *abfd, + struct bfd_link_info *info, + enum elf_linker_section_enum)); + +static boolean i370_elf_check_relocs PARAMS ((bfd *, + struct bfd_link_info *, + asection *, + const Elf_Internal_Rela *)); + +static boolean i370_elf_adjust_dynamic_symbol PARAMS ((struct bfd_link_info *, + struct elf_link_hash_entry *)); + +static boolean i370_elf_adjust_dynindx PARAMS ((struct elf_link_hash_entry *, PTR)); + +static boolean i370_elf_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); + +static boolean i370_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); + +/* The name of the dynamic interpreter. This is put in the .interp + section. */ + +#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so" + + +/* Set the howto pointer for an i370 ELF reloc. */ + +static void +i370_elf_info_to_howto (abfd, cache_ptr, dst) + bfd *abfd; + arelent *cache_ptr; + Elf32_Internal_Rela *dst; +{ + if (!i370_elf_howto_table[ R_I370_ADDR31 ]) /* Initialize howto table */ + i370_elf_howto_init (); + + BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_I370_max); + cache_ptr->howto = i370_elf_howto_table[ELF32_R_TYPE (dst->r_info)]; +} + +/* hack alert -- the following several routines look generic to me ... + * why are we bothering with them ??? + */ +/* Function to set whether a module needs the -mrelocatable bit set. */ +static boolean +i370_elf_set_private_flags (abfd, flags) + bfd *abfd; + flagword flags; +{ + BFD_ASSERT (!elf_flags_init (abfd) + || elf_elfheader (abfd)->e_flags == flags); + + elf_elfheader (abfd)->e_flags = flags; + elf_flags_init (abfd) = true; + return true; +} + +/* Copy backend specific data from one object module to another */ +static boolean +i370_elf_copy_private_bfd_data (ibfd, obfd) + bfd *ibfd; + bfd *obfd; +{ + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour + || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + return true; + + BFD_ASSERT (!elf_flags_init (obfd) + || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags); + + elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; + elf_flags_init (obfd) = true; + return true; +} + +/* Merge backend specific data from an object file to the output + object file when linking */ +static boolean +i370_elf_merge_private_bfd_data (ibfd, obfd) + bfd *ibfd; + bfd *obfd; +{ + flagword old_flags; + flagword new_flags; + + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour + || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + return true; + + new_flags = elf_elfheader (ibfd)->e_flags; + old_flags = elf_elfheader (obfd)->e_flags; + if (!elf_flags_init (obfd)) /* First call, no flags set */ + { + elf_flags_init (obfd) = true; + elf_elfheader (obfd)->e_flags = new_flags; + } + + else if (new_flags == old_flags) /* Compatible flags are ok */ + ; + + else /* Incompatible flags */ + { + (*_bfd_error_handler) + ("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)", + bfd_get_filename (ibfd), (long)new_flags, (long)old_flags); + + bfd_set_error (bfd_error_bad_value); + return false; + } + + return true; +} + + +/* Handle an i370 specific section when reading an object file. This + is called when elfcode.h finds a section with an unknown type. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_section_from_shdr (abfd, hdr, name) + bfd *abfd; + Elf32_Internal_Shdr *hdr; + char *name; +{ + asection *newsect; + flagword flags; + + if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name)) + return false; + + newsect = hdr->bfd_section; + flags = bfd_get_section_flags (abfd, newsect); + if (hdr->sh_flags & SHF_EXCLUDE) + flags |= SEC_EXCLUDE; + + if (hdr->sh_type == SHT_ORDERED) + flags |= SEC_SORT_ENTRIES; + + bfd_set_section_flags (abfd, newsect, flags); + return true; +} + + + +/* Set up any other section flags and such that may be necessary. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + + +static boolean +i370_elf_fake_sections (abfd, shdr, asect) + bfd *abfd; + Elf32_Internal_Shdr *shdr; + asection *asect; +{ + if ((asect->flags & SEC_EXCLUDE) != 0) + shdr->sh_flags |= SHF_EXCLUDE; + + if ((asect->flags & SEC_SORT_ENTRIES) != 0) + shdr->sh_type = SHT_ORDERED; + + return true; +} + + +/* Create a special linker section */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static elf_linker_section_t * +i370_elf_create_linker_section (abfd, info, which) + bfd *abfd; + struct bfd_link_info *info; + enum elf_linker_section_enum which; +{ + bfd *dynobj = elf_hash_table (info)->dynobj; + elf_linker_section_t *lsect; + + /* Record the first bfd section that needs the special section */ + if (!dynobj) + dynobj = elf_hash_table (info)->dynobj = abfd; + + /* If this is the first time, create the section */ + lsect = elf_linker_section (dynobj, which); + if (!lsect) + { + elf_linker_section_t defaults; + static elf_linker_section_t zero_section; + + defaults = zero_section; + defaults.which = which; + defaults.hole_written_p = false; + defaults.alignment = 2; + + /* Both of these sections are (technically) created by the user + putting data in them, so they shouldn't be marked + SEC_LINKER_CREATED. + + The linker creates them so it has somewhere to attach their + respective symbols. In fact, if they were empty it would + be OK to leave the symbol set to 0 (or any random number), because + the appropriate register should never be used. */ + defaults.flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS + | SEC_IN_MEMORY); + + switch (which) + { + default: + (*_bfd_error_handler) ("%s: Unknown special linker type %d", + bfd_get_filename (abfd), + (int)which); + + bfd_set_error (bfd_error_bad_value); + return (elf_linker_section_t *)0; + + case LINKER_SECTION_SDATA: /* .sdata/.sbss section */ + defaults.name = ".sdata"; + defaults.rel_name = ".rela.sdata"; + defaults.bss_name = ".sbss"; + defaults.sym_name = "_SDA_BASE_"; + defaults.sym_offset = 32768; + break; + + case LINKER_SECTION_SDATA2: /* .sdata2/.sbss2 section */ + defaults.name = ".sdata2"; + defaults.rel_name = ".rela.sdata2"; + defaults.bss_name = ".sbss2"; + defaults.sym_name = "_SDA2_BASE_"; + defaults.sym_offset = 32768; + defaults.flags |= SEC_READONLY; + break; + } + + lsect = _bfd_elf_create_linker_section (abfd, info, which, &defaults); + } + + return lsect; +} + + +/* We have to create .dynsbss and .rela.sbss here so that they get mapped + to output sections (just like _bfd_elf_create_dynamic_sections has + to create .dynbss and .rela.bss). */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_create_dynamic_sections (abfd, info) + bfd *abfd; + struct bfd_link_info *info; +{ + register asection *s; + flagword flags; + + if (!_bfd_elf_create_dynamic_sections(abfd, info)) + return false; + + flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY + | SEC_LINKER_CREATED); + + s = bfd_make_section (abfd, ".dynsbss"); + if (s == NULL + || ! bfd_set_section_flags (abfd, s, SEC_ALLOC)) + return false; + + if (! info->shared) + { + s = bfd_make_section (abfd, ".rela.sbss"); + if (s == NULL + || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY) + || ! bfd_set_section_alignment (abfd, s, 2)) + return false; + } + + /* xxx beats me, seem to need a rela.text ... */ + s = bfd_make_section (abfd, ".rela.text"); + if (s == NULL + || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY) + || ! bfd_set_section_alignment (abfd, s, 2)) + return false; + return true; +} + +/* Adjust a symbol defined by a dynamic object and referenced by a + regular object. The current definition is in some section of the + dynamic object, but we're not including those sections. We have to + change the definition to something the rest of the link can + understand. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_adjust_dynamic_symbol (info, h) + struct bfd_link_info *info; + struct elf_link_hash_entry *h; +{ + bfd *dynobj = elf_hash_table (info)->dynobj; + asection *s; + unsigned int power_of_two; + bfd_vma plt_offset; + +#ifdef DEBUG + fprintf (stderr, "i370_elf_adjust_dynamic_symbol called for %s\n", + h->root.root.string); +#endif + + /* Make sure we know what is going on here. */ + BFD_ASSERT (dynobj != NULL + && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) + || h->weakdef != NULL + || ((h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_DYNAMIC) != 0 + && (h->elf_link_hash_flags + & ELF_LINK_HASH_REF_REGULAR) != 0 + && (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0))); + + + s = bfd_get_section_by_name (dynobj, ".rela.text"); + BFD_ASSERT (s != NULL); + s->_raw_size += sizeof (Elf32_External_Rela); + + /* If this is a weak symbol, and there is a real definition, the + processor independent code will have arranged for us to see the + real definition first, and we can just use the same value. */ + if (h->weakdef != NULL) + { + BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined + || h->weakdef->root.type == bfd_link_hash_defweak); + h->root.u.def.section = h->weakdef->root.u.def.section; + h->root.u.def.value = h->weakdef->root.u.def.value; + return true; + } + + /* This is a reference to a symbol defined by a dynamic object which + is not a function. */ + + /* If we are creating a shared library, we must presume that the + only references to the symbol are via the global offset table. + For such cases we need not do anything here; the relocations will + be handled correctly by relocate_section. */ + if (info->shared) + return true; + + /* We must allocate the symbol in our .dynbss section, which will + become part of the .bss section of the executable. There will be + an entry for this symbol in the .dynsym section. The dynamic + object will contain position independent code, so all references + from the dynamic object to this symbol will go through the global + offset table. The dynamic linker will use the .dynsym entry to + determine the address it must put in the global offset table, so + both the dynamic object and the regular object will refer to the + same memory location for the variable. + + Of course, if the symbol is sufficiently small, we must instead + allocate it in .sbss. FIXME: It would be better to do this if and + only if there were actually SDAREL relocs for that symbol. */ + + if (h->size <= elf_gp_size (dynobj)) + s = bfd_get_section_by_name (dynobj, ".dynsbss"); + else + s = bfd_get_section_by_name (dynobj, ".dynbss"); + BFD_ASSERT (s != NULL); + + /* We must generate a R_I370_COPY reloc to tell the dynamic linker to + copy the initial value out of the dynamic object and into the + runtime process image. We need to remember the offset into the + .rela.bss section we are going to use. */ + if ((h->root.u.def.section->flags & SEC_ALLOC) != 0) + { + asection *srel; + + if (h->size <= elf_gp_size (dynobj)) + srel = bfd_get_section_by_name (dynobj, ".rela.sbss"); + else + srel = bfd_get_section_by_name (dynobj, ".rela.bss"); + BFD_ASSERT (srel != NULL); + srel->_raw_size += sizeof (Elf32_External_Rela); + h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY; + } + + /* We need to figure out the alignment required for this symbol. I + have no idea how ELF linkers handle this. */ + power_of_two = bfd_log2 (h->size); + if (power_of_two > 4) + power_of_two = 4; + + /* Apply the required alignment. */ + s->_raw_size = BFD_ALIGN (s->_raw_size, + (bfd_size_type) (1 << power_of_two)); + if (power_of_two > bfd_get_section_alignment (dynobj, s)) + { + if (! bfd_set_section_alignment (dynobj, s, power_of_two)) + return false; + } + + /* Define the symbol as being at this point in the section. */ + h->root.u.def.section = s; + h->root.u.def.value = s->_raw_size; + + /* Increment the section size to make room for the symbol. */ + s->_raw_size += h->size; + + return true; +} + + +/* Increment the index of a dynamic symbol by a given amount. Called + via elf_link_hash_traverse. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_adjust_dynindx (h, cparg) + struct elf_link_hash_entry *h; + PTR cparg; +{ + int *cp = (int *) cparg; + +#ifdef DEBUG + fprintf (stderr, + "i370_elf_adjust_dynindx called, h->dynindx = %d, *cp = %d\n", + h->dynindx, *cp); +#endif + + if (h->dynindx != -1) + h->dynindx += *cp; + + return true; +} + + +/* Set the sizes of the dynamic sections. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_size_dynamic_sections (output_bfd, info) + bfd *output_bfd; + struct bfd_link_info *info; +{ + bfd *dynobj; + asection *s; + boolean plt; + boolean relocs; + boolean reltext; + +#ifdef DEBUG + fprintf (stderr, "i370_elf_size_dynamic_sections called\n"); +#endif + + dynobj = elf_hash_table (info)->dynobj; + BFD_ASSERT (dynobj != NULL); + + if (elf_hash_table (info)->dynamic_sections_created) + { + /* Set the contents of the .interp section to the interpreter. */ + if (! info->shared) + { + s = bfd_get_section_by_name (dynobj, ".interp"); + BFD_ASSERT (s != NULL); + s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER; + s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER; + } + } + else + { + /* We may have created entries in the .rela.got, .rela.sdata, and + .rela.sdata2 sections. However, if we are not creating the + dynamic sections, we will not actually use these entries. Reset + the size of .rela.got, et al, which will cause it to get + stripped from the output file below. */ + static char *rela_sections[] = { ".rela.got", ".rela.sdata", + ".rela.sdata2", ".rela.sbss", + (char *)0 }; + char **p; + + for (p = rela_sections; *p != (char *)0; p++) + { + s = bfd_get_section_by_name (dynobj, *p); + if (s != NULL) + s->_raw_size = 0; + } + } + + /* The check_relocs and adjust_dynamic_symbol entry points have + determined the sizes of the various dynamic sections. Allocate + memory for them. */ + plt = false; + relocs = false; + reltext = false; + for (s = dynobj->sections; s != NULL; s = s->next) + { + const char *name; + boolean strip; + + if ((s->flags & SEC_LINKER_CREATED) == 0) + continue; + + /* It's OK to base decisions on the section name, because none + of the dynobj section names depend upon the input files. */ + name = bfd_get_section_name (dynobj, s); + strip = false; + + if (strcmp (name, ".plt") == 0) + { + if (s->_raw_size == 0) + { + /* Strip this section if we don't need it; see the + comment below. */ + strip = true; + } + else + { + /* Remember whether there is a PLT. */ + plt = true; + } + } + else if (strncmp (name, ".rela", 5) == 0) + { + if (s->_raw_size == 0) + { + /* If we don't need this section, strip it from the + output file. This is mostly to handle .rela.bss and + .rela.plt. We must create both sections in + create_dynamic_sections, because they must be created + before the linker maps input sections to output + sections. The linker does that before + adjust_dynamic_symbol is called, and it is that + function which decides whether anything needs to go + into these sections. */ + strip = true; + } + else + { + asection *target; + const char *outname; + + /* Remember whether there are any relocation sections. */ + relocs = true; + + /* If this relocation section applies to a read only + section, then we probably need a DT_TEXTREL entry. */ + outname = bfd_get_section_name (output_bfd, + s->output_section); + target = bfd_get_section_by_name (output_bfd, outname + 5); + if (target != NULL + && (target->flags & SEC_READONLY) != 0 + && (target->flags & SEC_ALLOC) != 0) + reltext = true; + + /* We use the reloc_count field as a counter if we need + to copy relocs into the output file. */ + s->reloc_count = 0; + } + } + else if (strcmp (name, ".got") != 0 + && strcmp (name, ".sdata") != 0 + && strcmp (name, ".sdata2") != 0) + { + /* It's not one of our sections, so don't allocate space. */ + continue; + } + + if (strip) + { + asection **spp; + + for (spp = &s->output_section->owner->sections; + *spp != s->output_section; + spp = &(*spp)->next) + ; + *spp = s->output_section->next; + --s->output_section->owner->section_count; + + continue; + } + /* Allocate memory for the section contents. */ + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size); + if (s->contents == NULL && s->_raw_size != 0) + return false; + } + + if (elf_hash_table (info)->dynamic_sections_created) + { + /* Add some entries to the .dynamic section. We fill in the + values later, in i370_elf_finish_dynamic_sections, but we + must add the entries now so that we get the correct size for + the .dynamic section. The DT_DEBUG entry is filled in by the + dynamic linker and used by the debugger. */ + if (! info->shared) + { + if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0)) + return false; + } + + if (plt) + { + if (! bfd_elf32_add_dynamic_entry (info, DT_PLTGOT, 0) + || ! bfd_elf32_add_dynamic_entry (info, DT_PLTRELSZ, 0) + || ! bfd_elf32_add_dynamic_entry (info, DT_PLTREL, DT_RELA) + || ! bfd_elf32_add_dynamic_entry (info, DT_JMPREL, 0)) + return false; + } + + if (relocs) + { + if (! bfd_elf32_add_dynamic_entry (info, DT_RELA, 0) + || ! bfd_elf32_add_dynamic_entry (info, DT_RELASZ, 0) + || ! bfd_elf32_add_dynamic_entry (info, DT_RELAENT, + sizeof (Elf32_External_Rela))) + return false; + } + + if (reltext) + { + if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0)) + return false; + } + } + + /* If we are generating a shared library, we generate a section + symbol for each output section. These are local symbols, which + means that they must come first in the dynamic symbol table. + That means we must increment the dynamic symbol index of every + other dynamic symbol. + + FIXME: We assume that there will never be relocations to + locations in linker-created sections that do not have + externally-visible names. Instead, we should work out precisely + which sections relocations are targetted at. */ + if (info->shared) + { + int c; + + for (c = 0, s = output_bfd->sections; s != NULL; s = s->next) + { + if ((s->flags & SEC_LINKER_CREATED) != 0 + || (s->flags & SEC_ALLOC) == 0) + { + elf_section_data (s)->dynindx = -1; + continue; + } + + /* These symbols will have no names, so we don't need to + fiddle with dynstr_index. */ + + elf_section_data (s)->dynindx = c + 1; + + c++; + } + + elf_link_hash_traverse (elf_hash_table (info), + i370_elf_adjust_dynindx, + (PTR) &c); + elf_hash_table (info)->dynsymcount += c; + } + + return true; +} + + +/* Look through the relocs for a section during the first phase, and + allocate space in the global offset table or procedure linkage + table. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_check_relocs (abfd, info, sec, relocs) + bfd *abfd; + struct bfd_link_info *info; + asection *sec; + const Elf_Internal_Rela *relocs; +{ + bfd *dynobj; + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes; + const Elf_Internal_Rela *rel; + const Elf_Internal_Rela *rel_end; + bfd_vma *local_got_offsets; + elf_linker_section_t *sdata; + elf_linker_section_t *sdata2; + asection *sreloc; + asection *sgot; + asection *srelgot = NULL; + + if (info->relocateable) + return true; + +#ifdef DEBUG + fprintf (stderr, "i370_elf_check_relocs called for section %s in %s\n", + bfd_get_section_name (abfd, sec), + bfd_get_filename (abfd)); +#endif + + dynobj = elf_hash_table (info)->dynobj; + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (abfd); + local_got_offsets = elf_local_got_offsets (abfd); + + sreloc = NULL; + + rel_end = relocs + sec->reloc_count; + for (rel = relocs; rel < rel_end; rel++) + { + unsigned long r_symndx; + struct elf_link_hash_entry *h; + + r_symndx = ELF32_R_SYM (rel->r_info); + if (r_symndx < symtab_hdr->sh_info) + h = NULL; + else + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + + if (info->shared) + { +#ifdef DEBUG + fprintf (stderr, + "i370_elf_check_relocs needs to create relocation for %s\n", + (h && h->root.root.string) + ? h->root.root.string : "<unknown>"); +#endif + if (sreloc == NULL) + { + const char *name; + + name = (bfd_elf_string_from_elf_section + (abfd, + elf_elfheader (abfd)->e_shstrndx, + elf_section_data (sec)->rel_hdr.sh_name)); + if (name == NULL) + return false; + + BFD_ASSERT (strncmp (name, ".rela", 5) == 0 + && strcmp (bfd_get_section_name (abfd, sec), name + 5) == 0); + + sreloc = bfd_get_section_by_name (dynobj, name); + if (sreloc == NULL) + { + flagword flags; + + sreloc = bfd_make_section (dynobj, name); + flags = (SEC_HAS_CONTENTS | SEC_READONLY + | SEC_IN_MEMORY | SEC_LINKER_CREATED); + if ((sec->flags & SEC_ALLOC) != 0) + flags |= SEC_ALLOC | SEC_LOAD; + if (sreloc == NULL + || ! bfd_set_section_flags (dynobj, sreloc, flags) + || ! bfd_set_section_alignment (dynobj, sreloc, 2)) + return false; + } + } + + sreloc->_raw_size += sizeof (Elf32_External_Rela); + + /* FIXME: We should here do what the m68k and i386 + backends do: if the reloc is pc-relative, record it + in case it turns out that the reloc is unnecessary + because the symbol is forced local by versioning or + we are linking with -Bdynamic. Fortunately this + case is not frequent. */ + } + } + + return true; +} + + +/* Finish up the dynamic sections. */ +/* XXX hack alert bogus This routine is mostly all junk and almost + * certainly does the wrong thing. Its here simply because it does + * just enough to allow glibc-2.1 ld.so to compile & link. + */ + +static boolean +i370_elf_finish_dynamic_sections (output_bfd, info) + bfd *output_bfd; + struct bfd_link_info *info; +{ + asection *sdyn; + bfd *dynobj = elf_hash_table (info)->dynobj; + asection *sgot = bfd_get_section_by_name (dynobj, ".got"); + +#ifdef DEBUG + fprintf (stderr, "i370_elf_finish_dynamic_sections called\n"); +#endif + + sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); + + if (elf_hash_table (info)->dynamic_sections_created) + { + asection *splt; + Elf32_External_Dyn *dyncon, *dynconend; + + splt = bfd_get_section_by_name (dynobj, ".plt"); + BFD_ASSERT (splt != NULL && sdyn != NULL); + + dyncon = (Elf32_External_Dyn *) sdyn->contents; + dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size); + for (; dyncon < dynconend; dyncon++) + { + Elf_Internal_Dyn dyn; + const char *name; + boolean size; + + bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn); + + switch (dyn.d_tag) + { + case DT_PLTGOT: name = ".plt"; size = false; break; + case DT_PLTRELSZ: name = ".rela.plt"; size = true; break; + case DT_JMPREL: name = ".rela.plt"; size = false; break; + default: name = NULL; size = false; break; + } + + if (name != NULL) + { + asection *s; + + s = bfd_get_section_by_name (output_bfd, name); + if (s == NULL) + dyn.d_un.d_val = 0; + else + { + if (! size) + dyn.d_un.d_ptr = s->vma; + else + { + if (s->_cooked_size != 0) + dyn.d_un.d_val = s->_cooked_size; + else + dyn.d_un.d_val = s->_raw_size; + } + } + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); + } + } + } + + /* Add a blrl instruction at _GLOBAL_OFFSET_TABLE_-4 so that a function can + easily find the address of the _GLOBAL_OFFSET_TABLE_. */ +/* XXX this is clearly very wrong for the 370 arch */ + if (sgot) + { + unsigned char *contents = sgot->contents; + bfd_put_32 (output_bfd, 0x4e800021 /* blrl */, contents); + + if (sdyn == NULL) + bfd_put_32 (output_bfd, (bfd_vma) 0, contents+4); + else + bfd_put_32 (output_bfd, + sdyn->output_section->vma + sdyn->output_offset, + contents+4); + + elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; + } + + if (info->shared) + { + asection *sdynsym; + asection *s; + Elf_Internal_Sym sym; + int maxdindx = 0; + + /* Set up the section symbols for the output sections. */ + + sdynsym = bfd_get_section_by_name (dynobj, ".dynsym"); + BFD_ASSERT (sdynsym != NULL); + + sym.st_size = 0; + sym.st_name = 0; + sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION); + sym.st_other = 0; + + for (s = output_bfd->sections; s != NULL; s = s->next) + { + int indx, dindx; + + sym.st_value = s->vma; + + indx = elf_section_data (s)->this_idx; + dindx = elf_section_data (s)->dynindx; + if (dindx != -1) + { + BFD_ASSERT(indx > 0); + BFD_ASSERT(dindx > 0); + + if (dindx > maxdindx) + maxdindx = dindx; + + sym.st_shndx = indx; + + bfd_elf32_swap_symbol_out (output_bfd, &sym, + (PTR) (((Elf32_External_Sym *) + sdynsym->contents) + + dindx)); + } + } + + /* Set the sh_info field of the output .dynsym section to the + index of the first global symbol. */ + elf_section_data (sdynsym->output_section)->this_hdr.sh_info = + maxdindx + 1; + } + + return true; +} + + +/* The RELOCATE_SECTION function is called by the ELF backend linker + to handle the relocations for a section. + + The relocs are always passed as Rela structures; if the section + actually uses Rel structures, the r_addend field will always be + zero. + + This function is responsible for adjust the section contents as + necessary, and (if using Rela relocs and generating a + relocateable output file) adjusting the reloc addend as + necessary. + + This function does not have to worry about setting the reloc + address or the reloc symbol index. + + LOCAL_SYMS is a pointer to the swapped in local symbols. + + LOCAL_SECTIONS is an array giving the section in the input file + corresponding to the st_shndx field of each local symbol. + + The global hash table entry for the global symbols can be found + via elf_sym_hashes (input_bfd). + + When generating relocateable output, this function must handle + STB_LOCAL/STT_SECTION symbols specially. The output symbol is + going to be the section symbol corresponding to the output + section, which means that the addend must be adjusted + accordingly. */ + +static boolean +i370_elf_relocate_section (output_bfd, info, input_bfd, input_section, + contents, relocs, local_syms, local_sections) + bfd *output_bfd; + struct bfd_link_info *info; + bfd *input_bfd; + asection *input_section; + bfd_byte *contents; + Elf_Internal_Rela *relocs; + Elf_Internal_Sym *local_syms; + asection **local_sections; +{ + Elf_Internal_Shdr *symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; + struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); + bfd *dynobj = elf_hash_table (info)->dynobj; + Elf_Internal_Rela *rel = relocs; + Elf_Internal_Rela *relend = relocs + input_section->reloc_count; + asection *sreloc = NULL; + bfd_vma *local_got_offsets; + boolean ret = true; + +#ifdef DEBUG + fprintf (stderr, "i370_elf_relocate_section called for %s section %s, %ld relocations%s\n", + bfd_get_filename (input_bfd), + bfd_section_name(input_bfd, input_section), + (long)input_section->reloc_count, + (info->relocateable) ? " (relocatable)" : ""); +#endif + + if (!i370_elf_howto_table[ R_I370_ADDR31 ]) /* Initialize howto table if needed */ + i370_elf_howto_init (); + + local_got_offsets = elf_local_got_offsets (input_bfd); + + for (; rel < relend; rel++) + { + enum i370_reloc_type r_type = (enum i370_reloc_type)ELF32_R_TYPE (rel->r_info); + bfd_vma offset = rel->r_offset; + bfd_vma addend = rel->r_addend; + bfd_reloc_status_type r = bfd_reloc_other; + Elf_Internal_Sym *sym = (Elf_Internal_Sym *)0; + asection *sec = (asection *)0; + struct elf_link_hash_entry *h = (struct elf_link_hash_entry *)0; + const char *sym_name = (const char *)0; + reloc_howto_type *howto; + unsigned long r_symndx; + bfd_vma relocation; + + /* Unknown relocation handling */ + if ((unsigned)r_type >= (unsigned)R_I370_max + || !i370_elf_howto_table[(int)r_type]) + { + (*_bfd_error_handler) ("%s: unknown relocation type %d", + bfd_get_filename (input_bfd), + (int)r_type); + + bfd_set_error (bfd_error_bad_value); + ret = false; + continue; + } + + howto = i370_elf_howto_table[(int)r_type]; + r_symndx = ELF32_R_SYM (rel->r_info); + + if (info->relocateable) + { + /* This is a relocateable link. We don't have to change + anything, unless the reloc is against a section symbol, + in which case we have to adjust according to where the + section symbol winds up in the output section. */ + if (r_symndx < symtab_hdr->sh_info) + { + sym = local_syms + r_symndx; + if ((unsigned)ELF_ST_TYPE (sym->st_info) == STT_SECTION) + { + sec = local_sections[r_symndx]; + addend = rel->r_addend += sec->output_offset + sym->st_value; + } + } + +#ifdef DEBUG + fprintf (stderr, "\ttype = %s (%d), symbol index = %ld, offset = %ld, addend = %ld\n", + howto->name, + (int)r_type, + r_symndx, + (long)offset, + (long)addend); +#endif + continue; + } + + /* This is a final link. */ + if (r_symndx < symtab_hdr->sh_info) + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; + sym_name = "<local symbol>"; + + relocation = (sec->output_section->vma + + sec->output_offset + + sym->st_value); + } + else + { + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + sym_name = h->root.root.string; + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + { + sec = h->root.u.def.section; + if (info->shared + && ((! info->symbolic && h->dynindx != -1) + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0) + && (input_section->flags & SEC_ALLOC) != 0 + && (r_type == R_I370_ADDR31 + || r_type == R_I370_COPY + || r_type == R_I370_ADDR16 + || r_type == R_I370_RELATIVE)) + { + /* In these cases, we don't need the relocation + value. We check specially because in some + obscure cases sec->output_section will be NULL. */ + relocation = 0; + } + else + relocation = (h->root.u.def.value + + sec->output_section->vma + + sec->output_offset); + } + else if (h->root.type == bfd_link_hash_undefweak) + relocation = 0; + else if (info->shared) + relocation = 0; + else + { + (*info->callbacks->undefined_symbol)(info, + h->root.root.string, + input_bfd, + input_section, + rel->r_offset); + ret = false; + continue; + } + } + + switch ((int)r_type) + { + default: + (*_bfd_error_handler) ("%s: unknown relocation type %d for symbol %s", + bfd_get_filename (input_bfd), + (int)r_type, sym_name); + + bfd_set_error (bfd_error_bad_value); + ret = false; + continue; + + /* Relocations that may need to be propagated if this is a shared + object. */ + case (int)R_I370_REL31: + /* If these relocations are not to a named symbol, they can be + handled right here, no need to bother the dynamic linker. */ + if (h == NULL + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + break; + /* fall through */ + + /* Relocations that always need to be propagated if this is a shared + object. */ + case (int)R_I370_NONE: + case (int)R_I370_ADDR31: + case (int)R_I370_ADDR16: + if (info->shared) + { + Elf_Internal_Rela outrel; + boolean skip; + +#ifdef DEBUG + fprintf (stderr, + "i370_elf_relocate_section needs to create relocation for %s\n", + (h && h->root.root.string) ? h->root.root.string : "<unknown>"); +#endif + + /* When generating a shared object, these relocations + are copied into the output file to be resolved at run + time. */ + + if (sreloc == NULL) + { + const char *name; + + name = (bfd_elf_string_from_elf_section + (input_bfd, + elf_elfheader (input_bfd)->e_shstrndx, + elf_section_data (input_section)->rel_hdr.sh_name)); + if (name == NULL) + return false; + + BFD_ASSERT (strncmp (name, ".rela", 5) == 0 + && strcmp (bfd_get_section_name (input_bfd, + input_section), + name + 5) == 0); + + sreloc = bfd_get_section_by_name (dynobj, name); + BFD_ASSERT (sreloc != NULL); + } + + skip = false; + + if (elf_section_data (input_section)->stab_info == NULL) + outrel.r_offset = rel->r_offset; + else + { + bfd_vma off; + + off = (_bfd_stab_section_offset + (output_bfd, &elf_hash_table (info)->stab_info, + input_section, + &elf_section_data (input_section)->stab_info, + rel->r_offset)); + if (off == (bfd_vma) -1) + skip = true; + outrel.r_offset = off; + } + + outrel.r_offset += (input_section->output_section->vma + + input_section->output_offset); + + if (skip) + memset (&outrel, 0, sizeof outrel); + /* h->dynindx may be -1 if this symbol was marked to + become local. */ + else if (h != NULL + && ((! info->symbolic && h->dynindx != -1) + || (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_REGULAR) == 0)) + { + BFD_ASSERT (h->dynindx != -1); + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); + outrel.r_addend = rel->r_addend; + } + else + { + if (r_type == R_I370_ADDR31) + { + outrel.r_info = ELF32_R_INFO (0, R_I370_RELATIVE); + outrel.r_addend = relocation + rel->r_addend; + } + else + { + long indx; + + if (h == NULL) + sec = local_sections[r_symndx]; + else + { + BFD_ASSERT (h->root.type == bfd_link_hash_defined + || (h->root.type + == bfd_link_hash_defweak)); + sec = h->root.u.def.section; + } + if (sec != NULL && bfd_is_abs_section (sec)) + indx = 0; + else if (sec == NULL || sec->owner == NULL) + { + bfd_set_error (bfd_error_bad_value); + return false; + } + else + { + asection *osec; + + osec = sec->output_section; + indx = elf_section_data (osec)->dynindx; + BFD_ASSERT(indx > 0); +#ifdef DEBUG + if (indx <= 0) + { + printf("indx=%d section=%s flags=%08x name=%s\n", + indx, osec->name, osec->flags, + h->root.root.string); + } +#endif + } + + outrel.r_info = ELF32_R_INFO (indx, r_type); + outrel.r_addend = relocation + rel->r_addend; + } + } + + bfd_elf32_swap_reloca_out (output_bfd, &outrel, + (((Elf32_External_Rela *) + sreloc->contents) + + sreloc->reloc_count)); + ++sreloc->reloc_count; + + /* This reloc will be computed at runtime, so there's no + need to do anything now, unless this is a RELATIVE + reloc in an unallocated section. */ + if (skip + || (input_section->flags & SEC_ALLOC) != 0 + || ELF32_R_TYPE (outrel.r_info) != R_I370_RELATIVE) + continue; + } + break; + + case (int)R_I370_COPY: + case (int)R_I370_RELATIVE: + (*_bfd_error_handler) ("%s: Relocation %s is not yet supported for symbol %s.", + bfd_get_filename (input_bfd), + i370_elf_howto_table[ (int)r_type ]->name, + sym_name); + + bfd_set_error (bfd_error_invalid_operation); + ret = false; + continue; + } + + +#ifdef DEBUG + fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n", + howto->name, + (int)r_type, + sym_name, + r_symndx, + (long)offset, + (long)addend); +#endif + + r = _bfd_final_link_relocate (howto, + input_bfd, + input_section, + contents, + offset, + relocation, + addend); + + if (r != bfd_reloc_ok) + { + ret = false; + switch (r) + { + default: + break; + + case bfd_reloc_overflow: + { + const char *name; + + if (h != NULL) + name = h->root.root.string; + else + { + name = bfd_elf_string_from_elf_section (input_bfd, + symtab_hdr->sh_link, + sym->st_name); + if (name == NULL) + break; + + if (*name == '\0') + name = bfd_section_name (input_bfd, sec); + } + + (*info->callbacks->reloc_overflow)(info, + name, + howto->name, + (bfd_vma) 0, + input_bfd, + input_section, + offset); + } + break; + + } + } + } + + +#ifdef DEBUG + fprintf (stderr, "\n"); +#endif + + return ret; +} + +static void +i370_elf_post_process_headers (abfd, link_info) + bfd * abfd; + struct bfd_link_info * link_info ATTRIBUTE_UNUSED; +{ + Elf_Internal_Ehdr * i_ehdrp; /* Elf file header, internal form */ + + i_ehdrp = elf_elfheader (abfd); + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX; +} + +#define TARGET_BIG_SYM bfd_elf32_i370_vec +#define TARGET_BIG_NAME "elf32-i370" +#define ELF_ARCH bfd_arch_i370 +#define ELF_MACHINE_CODE EM_S370 +#ifdef EM_I370_OLD +#define ELF_MACHINE_ALT1 EM_I370_OLD +#endif +#define ELF_MAXPAGESIZE 0x1000 +#define elf_info_to_howto i370_elf_info_to_howto + + + +#define elf_backend_plt_not_loaded 1 +#define elf_backend_got_symbol_offset 4 + +#define bfd_elf32_bfd_reloc_type_lookup i370_elf_reloc_type_lookup +#define bfd_elf32_bfd_set_private_flags i370_elf_set_private_flags +#define bfd_elf32_bfd_copy_private_bfd_data i370_elf_copy_private_bfd_data +#define bfd_elf32_bfd_merge_private_bfd_data i370_elf_merge_private_bfd_data +#define elf_backend_relocate_section i370_elf_relocate_section + +/* dynamic loader support is mostly broken; just enough here to be able to + * link glibc's ld.so without errors. + */ +#define elf_backend_create_dynamic_sections i370_elf_create_dynamic_sections +#define elf_backend_size_dynamic_sections i370_elf_size_dynamic_sections +#define elf_backend_finish_dynamic_sections i370_elf_finish_dynamic_sections +#define elf_backend_fake_sections i370_elf_fake_sections +#define elf_backend_section_from_shdr i370_elf_section_from_shdr +#define elf_backend_adjust_dynamic_symbol i370_elf_adjust_dynamic_symbol +#define elf_backend_check_relocs i370_elf_check_relocs + +/* +#define elf_backend_add_symbol_hook i370_elf_add_symbol_hook +#define elf_backend_finish_dynamic_symbol i370_elf_finish_dynamic_symbol +#define elf_backend_additional_program_headers i370_elf_additional_program_headers +#define elf_backend_modify_segment_map i370_elf_modify_segment_map +*/ + +#define elf_backend_post_process_headers i370_elf_post_process_headers + +int i370_noop() +{ + return 1; +} + +/* we need to define these at least as no-ops to link glibc ld.so */ + +#define elf_backend_add_symbol_hook \ + (boolean (*) PARAMS ((bfd *, struct bfd_link_info *, \ + const char *, Elf_Internal_Sym *, \ + asection *))) i370_noop +#define elf_backend_finish_dynamic_symbol \ + (boolean (*) PARAMS ((bfd *, struct bfd_link_info *, \ + struct elf_link_hash_entry *, \ + Elf_Internal_Sym *))) i370_noop +#define elf_backend_additional_program_headers \ + (int (*) PARAMS ((bfd *))) i370_noop +#define elf_backend_modify_segment_map \ + (boolean (*) PARAMS ((bfd *))) i370_noop + +#include "elf32-target.h" diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 26bf7ef..b5163f9 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -762,6 +762,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_PPC_EMB_RELST_HA", "BFD_RELOC_PPC_EMB_BIT_FLD", "BFD_RELOC_PPC_EMB_RELSDA", + "BFD_RELOC_I370_D12", "BFD_RELOC_CTOR", "BFD_RELOC_ARM_PCREL_BRANCH", "BFD_RELOC_ARM_IMMEDIATE", diff --git a/bfd/reloc.c b/bfd/reloc.c index 856994b..79d602a 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -1,5 +1,5 @@ /* BFD support for handling relocation entries. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -2204,6 +2204,11 @@ ENUMDOC Power(rs6000) and PowerPC relocations. ENUM + BFD_RELOC_I370_D12 +ENUMDOC + IBM 370/390 relocations + +ENUM BFD_RELOC_CTOR ENUMDOC The type of reloc used to build a contructor table - at the moment diff --git a/bfd/targets.c b/bfd/targets.c index c5ec4d4..51c8934 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -1,5 +1,5 @@ /* Generic target-file-type support for the BFD library. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -518,6 +518,7 @@ extern const bfd_target bfd_elf64_bigmips_vec; extern const bfd_target bfd_elf32_d10v_vec; extern const bfd_target bfd_elf32_d30v_vec; extern const bfd_target bfd_elf32_hppa_vec; +extern const bfd_target bfd_elf32_i370_vec; extern const bfd_target bfd_elf32_i386_vec; extern const bfd_target bfd_elf32_i860_vec; extern const bfd_target bfd_elf32_i960_vec; @@ -697,6 +698,7 @@ const bfd_target * const bfd_target_vector[] = { #if 0 &bfd_elf32_hppa_vec, #endif + &bfd_elf32_i370_vec, &bfd_elf32_i386_vec, &bfd_elf32_i860_vec, &bfd_elf32_i960_vec, diff --git a/config/ChangeLog b/config/ChangeLog index 80b91b9..b5746b1 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2000-02-23 Linas Vepstas <linas@linas.org> + + * mh-i370pic: New file. + * mt-i370pic: New file. + 2000-02-22 Nick Clifton <nickc@cygnus.com> * config/mt-wince: new file: Makefile fragment for WinCE targets. diff --git a/config/mh-i370pic b/config/mh-i370pic new file mode 100644 index 0000000..35cf2c8 --- /dev/null +++ b/config/mh-i370pic @@ -0,0 +1 @@ +PICFLAG=-fPIC diff --git a/config/mt-i370pic b/config/mt-i370pic new file mode 100644 index 0000000..35b8c9e --- /dev/null +++ b/config/mt-i370pic @@ -0,0 +1 @@ +PICFLAG_FOR_TARGET=-fPIC diff --git a/configure.in b/configure.in index 920625a..417bee8 100644 --- a/configure.in +++ b/configure.in @@ -288,6 +288,9 @@ if [ x${shared} = xyes ]; then i[3456]86-*-*) host_makefile_frag="${host_makefile_frag} config/mh-x86pic" ;; + i370-*-*) + host_makefile_frag="${host_makefile_frag} config/mh-i370pic" + ;; sparc64-*-*) host_makefile_frag="${host_makefile_frag} config/mh-sparcpic" ;; diff --git a/gas/ChangeLog b/gas/ChangeLog index d52aec7..4a9b1a3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,21 @@ +2000-02-23 Linas Vepstas <linas@linas.org> + + * config/tc-i370.c, config/tc-i370.h: New files. + * Makefile.am: Add support for Linux/IBM 370. + * configure.in: Likewise. + * app.c (do_scrub_begin): Don't lex single quote when TC_I370. + * config/obj-elf.c: Include elf/i370.h + (obj_elf_section): Don't do anything special for flag_mri if TC_I370. + + * Makefile.in: Regenerate. + * configure: Regenerate. + + * doc/c-i370.texi: New file. + * doc/all.texi: Include it. + * doc/as.texinfo: And here. + * doc/Makefile.am(CPU_DOCS): Add c-i370.texi. + * doc/Makefile.in: Regenerate. + 2000-02-19 Michael Meissner <meissner@redhat.com> * config/tc-d30v.c (parallel_ok): Use FLAG_NOT_WITH_ADDSUBppp to diff --git a/gas/Makefile.am b/gas/Makefile.am index f8d204d..67ff1ce 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -44,6 +44,7 @@ CPU_TYPES = \ h8300 \ h8500 \ hppa \ + i370 \ i386 \ i860 \ i960 \ @@ -201,6 +202,7 @@ TARGET_CPU_CFILES = \ config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ + config/tc-i370.c \ config/tc-i386.c \ config/tc-i860.c \ config/tc-i960.c \ @@ -235,6 +237,7 @@ TARGET_CPU_HFILES = \ config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ + config/tc-i370.h \ config/tc-i386.h \ config/tc-i860.h \ config/tc-i960.h \ diff --git a/gas/Makefile.in b/gas/Makefile.in index 5246fdc..0bd7733 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -150,6 +150,7 @@ CPU_TYPES = \ h8300 \ h8500 \ hppa \ + i370 \ i386 \ i860 \ i960 \ @@ -313,6 +314,7 @@ TARGET_CPU_CFILES = \ config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ + config/tc-i370.c \ config/tc-i386.c \ config/tc-i860.c \ config/tc-i960.c \ @@ -348,6 +350,7 @@ TARGET_CPU_HFILES = \ config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ + config/tc-i370.h \ config/tc-i386.h \ config/tc-i860.h \ config/tc-i960.h \ @@ -106,7 +106,8 @@ do_scrub_begin (m68k_mri) { lex['"'] = LEX_IS_STRINGQUOTE; -#ifndef TC_HPPA +#if ! defined (TC_HPPA) && ! defined (TC_I370) + /* I370 uses single-quotes to delimit integer, float constants */ lex['\''] = LEX_IS_ONECHAR_QUOTE; #endif diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 2c94ecd..f9e4406 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -46,6 +46,10 @@ #include "elf/ppc.h" #endif +#ifdef TC_I370 +#include "elf/i370.h" +#endif + static bfd_vma elf_s_get_size PARAMS ((symbolS *)); static void elf_s_set_size PARAMS ((symbolS *, bfd_vma)); static bfd_vma elf_s_get_align PARAMS ((symbolS *)); @@ -792,6 +796,7 @@ obj_elf_section (push) char *name, *beg, *end; int type, attr, dummy; +#ifndef TC_I370 if (flag_mri) { char mri_type; @@ -811,6 +816,7 @@ obj_elf_section (push) return; } +#endif /* ! defined (TC_I370) */ /* Get name of section. */ SKIP_WHITESPACE (); diff --git a/gas/config/tc-i370.c b/gas/config/tc-i370.c new file mode 100644 index 0000000..2183273 --- /dev/null +++ b/gas/config/tc-i370.c @@ -0,0 +1,2967 @@ +/* tc-i370.c -- Assembler for the IBM 360/370/390 instruction set. + Loosely based on the ppc files by Linas Vepstas <linas@linas.org> 1998, 99 + Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Written by Ian Lance Taylor, Cygnus Support. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +/* This assembler implements a very hacked version of an elf-like thing + * that gcc emits (when gcc is suitably hacked). To make it behave more + * HLASM-like, try turning on the -M or --mri flag (as there are various + * similarities between HLASM and the MRI assemblers, such as section + * names, lack of leading . in pseudo-ops, DC and DS, etc ... + */ + +#include <stdio.h> +#include <ctype.h> +#include "as.h" +#include "subsegs.h" +#include "struc-symbol.h" + +#include "opcode/i370.h" + +#ifdef OBJ_ELF +#include "elf/i370.h" +#endif + +/* This is the assembler for the System/390 Architecture */ + +/* Tell the main code what the endianness is. */ +extern int target_big_endian; + + +/* Generic assembler global variables which must be defined by all + targets. */ + +#ifdef OBJ_ELF +/* This string holds the chars that always start a comment. If the + pre-processor is disabled, these aren't very useful. The macro + tc_comment_chars points to this. We use this, rather than the + usual comment_chars, so that we can switch for Solaris conventions. */ +static const char i370_eabi_comment_chars[] = "#"; + +const char *i370_comment_chars = i370_eabi_comment_chars; +#else +const char comment_chars[] = "#"; +#endif + +/* Characters which start a comment at the beginning of a line. */ +const char line_comment_chars[] = "#*"; + +/* Characters which may be used to separate multiple commands on a + single line. */ +const char line_separator_chars[] = ";"; + +/* Characters which are used to indicate an exponent in a floating + point number. */ +const char EXP_CHARS[] = "eE"; + +/* Characters which mean that a number is a floating point constant, + as in 0d1.0. */ +const char FLT_CHARS[] = "dD"; + + +void +md_show_usage (stream) + FILE *stream; +{ + fprintf(stream, "\ +S/370 options: (these have not yet been tested and may not work) \n\ +-u ignored\n\ +-mregnames Allow symbolic names for registers\n\ +-mno-regnames Do not allow symbolic names for registers\n"); +#ifdef OBJ_ELF + fprintf(stream, "\ +-mrelocatable support for GCC's -mrelocatble option\n\ +-mrelocatable-lib support for GCC's -mrelocatble-lib option\n\ +-V print assembler version number\n"); +#endif +} + + +static void i370_byte PARAMS ((int)); +static void i370_tc PARAMS ((int)); +static void i370_ebcdic PARAMS ((int)); + +static void i370_dc PARAMS ((int)); +static void i370_ds PARAMS ((int)); +static void i370_rmode PARAMS ((int)); +static void i370_csect PARAMS ((int)); +static void i370_dsect PARAMS ((int)); +static void i370_ltorg PARAMS ((int)); +static void i370_using PARAMS ((int)); +static void i370_drop PARAMS ((int)); +static void i370_make_relative PARAMS ((expressionS *exp, expressionS *baseaddr)); + +#ifdef OBJ_ELF +static bfd_reloc_code_real_type i370_elf_suffix PARAMS ((char **, expressionS *)); +static void i370_elf_cons PARAMS ((int)); +static void i370_elf_rdata PARAMS ((int)); +static void i370_elf_lcomm PARAMS ((int)); +static void i370_elf_validate_fix PARAMS ((fixS *, segT)); +#endif + + + +/* The target specific pseudo-ops which we support. */ + +const pseudo_typeS md_pseudo_table[] = +{ + /* Pseudo-ops which must be overridden. */ + { "byte", i370_byte, 0 }, + + { "dc", i370_dc, 0 }, + { "ds", i370_ds, 0 }, + { "rmode", i370_rmode, 0 }, + { "csect", i370_csect, 0 }, + { "dsect", i370_dsect, 0 }, + + /* enable ebcdic strings e.g. for 3270 support */ + { "ebcdic", i370_ebcdic, 0 }, + +#ifdef OBJ_ELF + { "long", i370_elf_cons, 4 }, + { "word", i370_elf_cons, 4 }, + { "short", i370_elf_cons, 2 }, + { "rdata", i370_elf_rdata, 0 }, + { "rodata", i370_elf_rdata, 0 }, + { "lcomm", i370_elf_lcomm, 0 }, +#endif + + /* This pseudo-op is used even when not generating XCOFF output. */ + { "tc", i370_tc, 0 }, + + /* dump the literal pool */ + { "ltorg", i370_ltorg, 0 }, + + /* support the hlasm-style USING directive */ + { "using", i370_using, 0 }, + { "drop", i370_drop, 0 }, + + { NULL, NULL, 0 } +}; + +/* ***************************************************************** */ + +/* Whether to use user friendly register names. */ +#define TARGET_REG_NAMES_P true + +static boolean reg_names_p = TARGET_REG_NAMES_P; + +static boolean register_name PARAMS ((expressionS *)); +static void i370_set_cpu PARAMS ((void)); +static i370_insn_t i370_insert_operand + PARAMS ((i370_insn_t insn, const struct i370_operand *operand, offsetT val)); +static void i370_macro PARAMS ((char *str, const struct i370_macro *macro)); + +/* Predefined register names if -mregnames */ +/* In general, there are lots of them, in an attempt to be compatible */ +/* with a number of assemblers. */ + +/* Structure to hold information about predefined registers. */ +struct pd_reg + { + char *name; + int value; + }; + +/* List of registers that are pre-defined: + + Each general register has predefined names of the form: + 1. r<reg_num> which has the value <reg_num>. + 2. r.<reg_num> which has the value <reg_num>. + + + Each floating point register has predefined names of the form: + 1. f<reg_num> which has the value <reg_num>. + 2. f.<reg_num> which has the value <reg_num>. + + There are only four floating point registers, and these are + commonly labelled 0,2,4 and 6. Thus, there is no f1, f3, etc. + + + There are individual registers as well: + rbase or r.base has the value 3 (base register) + rpgt or r.pgt has the value 4 (page origin table pointer) + rarg or r.arg has the value 11 (argument pointer) + rtca or r.tca has the value 12 (table of contents pointer) + rtoc or r.toc has the value 12 (table of contents pointer) + sp or r.sp has the value 13 (stack pointer) + dsa or r.dsa has the value 13 (stack pointer) + lr has the value 14 (link reg) + + The table is sorted. Suitable for searching by a binary search. */ + +static const struct pd_reg pre_defined_registers[] = +{ + { "arg", 11 }, /* Argument Pointer */ + { "base", 3 }, /* Base Reg */ + + { "f.0", 0 }, /* Floating point registers */ + { "f.2", 2 }, + { "f.4", 4 }, + { "f.6", 6 }, + + { "f0", 0 }, + { "f2", 2 }, + { "f4", 4 }, + { "f6", 6 }, + + + { "dsa",13 }, /* stack pointer */ + { "lr", 14 }, /* Link Register */ + { "pgt", 4 }, /* Page Origin Table Pointer */ + + { "r.0", 0 }, /* General Purpose Registers */ + { "r.1", 1 }, + { "r.10", 10 }, + { "r.11", 11 }, + { "r.12", 12 }, + { "r.13", 13 }, + { "r.14", 14 }, + { "r.15", 15 }, + { "r.2", 2 }, + { "r.3", 3 }, + { "r.4", 4 }, + { "r.5", 5 }, + { "r.6", 6 }, + { "r.7", 7 }, + { "r.8", 8 }, + { "r.9", 9 }, + + { "r.arg", 11 }, /* Argument Pointer */ + { "r.base", 3 }, /* Base Reg */ + { "r.dsa", 13 }, /* Stack Pointer */ + { "r.pgt", 4 }, /* Page Origin Table Pointer */ + { "r.sp", 13 }, /* Stack Pointer */ + + { "r.tca", 12 }, /* Pointer to the table of contents */ + { "r.toc", 12 }, /* Pointer to the table of contents */ + + { "r0", 0 }, /* More general purpose registers */ + { "r1", 1 }, + { "r10", 10 }, + { "r11", 11 }, + { "r12", 12 }, + { "r13", 13 }, + { "r14", 14 }, + { "r15", 15 }, + { "r2", 2 }, + { "r3", 3 }, + { "r4", 4 }, + { "r5", 5 }, + { "r6", 6 }, + { "r7", 7 }, + { "r8", 8 }, + { "r9", 9 }, + + { "rbase", 3 }, /* Base Reg */ + + { "rtca", 12 }, /* Pointer to the table of contents */ + { "rtoc", 12 }, /* Pointer to the table of contents */ + + { "sp", 13 }, /* Stack Pointer */ + +}; + +#define REG_NAME_CNT (sizeof(pre_defined_registers) / sizeof(struct pd_reg)) + +/* Given NAME, find the register number associated with that name, return + the integer value associated with the given name or -1 on failure. */ + +static int reg_name_search + PARAMS ((const struct pd_reg *, int, const char * name)); + +static int +reg_name_search (regs, regcount, name) + const struct pd_reg *regs; + int regcount; + const char *name; +{ + int middle, low, high; + int cmp; + + low = 0; + high = regcount - 1; + + do + { + middle = (low + high) / 2; + cmp = strcasecmp (name, regs[middle].name); + if (cmp < 0) + high = middle - 1; + else if (cmp > 0) + low = middle + 1; + else + return regs[middle].value; + } + while (low <= high); + + return -1; +} + +/* + * Summary of register_name(). + * + * in: Input_line_pointer points to 1st char of operand. + * + * out: A expressionS. + * The operand may have been a register: in this case, X_op == O_register, + * X_add_number is set to the register number, and truth is returned. + * Input_line_pointer->(next non-blank) char after operand, or is in its + * original state. + */ + +static boolean +register_name (expressionP) + expressionS *expressionP; +{ + int reg_number; + char *name; + char *start; + char c; + + /* Find the spelling of the operand */ + start = name = input_line_pointer; + if (name[0] == '%' && isalpha (name[1])) + name = ++input_line_pointer; + + else if (!reg_names_p) + return false; + + while (' ' == *name) + name = ++input_line_pointer; + + /* if its a number, treat it as a number */ + /* if its alpha, look to see if it's in the register table */ + if (!isalpha (name[0])) + { + reg_number = get_single_number(); + c = get_symbol_end (); + } + else + { + c = get_symbol_end (); + reg_number = reg_name_search (pre_defined_registers, REG_NAME_CNT, name); + } + + /* if numeric, make sure its not out of bounds */ + if ((0 <= reg_number) && (16 >= reg_number)) + { + expressionP->X_op = O_register; + expressionP->X_add_number = reg_number; + + /* make the rest nice */ + expressionP->X_add_symbol = NULL; + expressionP->X_op_symbol = NULL; + *input_line_pointer = c; /* put back the delimiting char */ + return true; + } + + /* reset the line as if we had not done anything */ + *input_line_pointer = c; /* put back the delimiting char */ + input_line_pointer = start; /* reset input_line pointer */ + return false; +} + +/* Local variables. */ + +/* The type of processor we are assembling for. This is one or more + of the I370_OPCODE flags defined in opcode/i370.h. */ +static int i370_cpu = 0; + +/* The base register to use for opcode with optional operands. + * We define two of these: "text" and "other". Normally, "text" + * would get used in the .text section for branches, while "other" + * gets used in the .data section for address constants. + * + * The idea of a second base register in a different section + * is foreign to the usual HLASM-style semantics; however, it + * allows us to provide support for dynamically loaded libraries, + * by allowing us to place address constants in a section other + * than the text section. The "other" section need not be the + * .data section, it can be any section that isn't the .text section. + * + * Note that HLASM defines a multiple, concurrent .using semantic + * that we do not: in calculating offsets, it uses either the most + * recent .using directive, or the one with the smallest displacement. + * This allows HLASM to support a quasi-block-scope-like behaviour. + * Handy for people writing assembly by hand ... but not supported + * by us. + */ +static int i370_using_text_regno = -1; +static int i370_using_other_regno = -1; + +/* The base address for address literals */ +static expressionS i370_using_text_baseaddr; +static expressionS i370_using_other_baseaddr; + +/* the "other" section, used only for syntax error detection */ +static segT i370_other_section = undefined_section; + +/* Opcode hash table. */ +static struct hash_control *i370_hash; + +/* Macro hash table. */ +static struct hash_control *i370_macro_hash; + +#ifdef OBJ_ELF +/* What type of shared library support to use */ +static enum { SHLIB_NONE, SHLIB_PIC, SHILB_MRELOCATABLE } shlib = SHLIB_NONE; +#endif + +/* Flags to set in the elf header */ +static flagword i370_flags = 0; + +#ifndef WORKING_DOT_WORD +const int md_short_jump_size = 4; +const int md_long_jump_size = 4; +#endif + +#ifdef OBJ_ELF +CONST char *md_shortopts = "l:um:K:VQ:"; +#else +CONST char *md_shortopts = "um:"; +#endif +struct option md_longopts[] = +{ + {NULL, no_argument, NULL, 0} +}; +size_t md_longopts_size = sizeof(md_longopts); + +int +md_parse_option (c, arg) + int c; + char *arg; +{ + switch (c) + { + case 'u': + /* -u means that any undefined symbols should be treated as + external, which is the default for gas anyhow. */ + break; + +#ifdef OBJ_ELF + case 'K': + /* Recognize -K PIC */ + if (strcmp (arg, "PIC") == 0 || strcmp (arg, "pic") == 0) + { + shlib = SHLIB_PIC; + i370_flags |= EF_I370_RELOCATABLE_LIB; + } + else + return 0; + + break; +#endif + + case 'm': + + /* -m360 mean to assemble for the ancient 360 architecture */ + if (strcmp (arg, "360") == 0 || strcmp (arg, "i360") == 0) + i370_cpu = I370_OPCODE_360; + /* -mxa means to assemble for the IBM 370 XA */ + else if (strcmp (arg, "xa") == 0) + i370_cpu = I370_OPCODE_370_XA; + /* -many means to assemble for any architecture (370/XA). */ + else if (strcmp (arg, "any") == 0) + i370_cpu = I370_OPCODE_370; + + else if (strcmp (arg, "regnames") == 0) + reg_names_p = true; + + else if (strcmp (arg, "no-regnames") == 0) + reg_names_p = false; + +#ifdef OBJ_ELF + /* -mrelocatable/-mrelocatable-lib -- warn about initializations that require relocation */ + else if (strcmp (arg, "relocatable") == 0) + { + shlib = SHILB_MRELOCATABLE; + i370_flags |= EF_I370_RELOCATABLE; + } + + else if (strcmp (arg, "relocatable-lib") == 0) + { + shlib = SHILB_MRELOCATABLE; + i370_flags |= EF_I370_RELOCATABLE_LIB; + } + +#endif + else + { + as_bad ("invalid switch -m%s", arg); + return 0; + } + break; + +#ifdef OBJ_ELF + /* -V: SVR4 argument to print version ID. */ + case 'V': + print_version_id (); + break; + + /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section + should be emitted or not. FIXME: Not implemented. */ + case 'Q': + break; + +#endif + + default: + return 0; + } + + return 1; +} + + +/* Set i370_cpu if it is not already set. + Currently defaults to the reasonable superset; + but can be made more fine grained if desred. */ + +static void +i370_set_cpu () +{ + const char *default_os = TARGET_OS; + const char *default_cpu = TARGET_CPU; + + /* override with the superset for the moment. */ + i370_cpu = I370_OPCODE_ESA390_SUPERSET; + if (i370_cpu == 0) + { + if (strcmp (default_cpu, "i360") == 0) + i370_cpu = I370_OPCODE_360; + else if (strcmp (default_cpu, "i370") == 0) + i370_cpu = I370_OPCODE_370; + else if (strcmp (default_cpu, "XA") == 0) + i370_cpu = I370_OPCODE_370_XA; + else + as_fatal ("Unknown default cpu = %s, os = %s", default_cpu, default_os); + } +} + +/* Figure out the BFD architecture to use. */ +// hack alert -- specify the different 370 architectures + +enum bfd_architecture +i370_arch () +{ + return bfd_arch_i370; +} + +/* This function is called when the assembler starts up. It is called + after the options have been parsed and the output file has been + opened. */ + +void +md_begin () +{ + register const struct i370_opcode *op; + const struct i370_opcode *op_end; + const struct i370_macro *macro; + const struct i370_macro *macro_end; + boolean dup_insn = false; + + i370_set_cpu (); + +#ifdef OBJ_ELF + /* Set the ELF flags if desired. */ + if (i370_flags) + bfd_set_private_flags (stdoutput, i370_flags); +#endif + + /* Insert the opcodes into a hash table. */ + i370_hash = hash_new (); + + op_end = i370_opcodes + i370_num_opcodes; + for (op = i370_opcodes; op < op_end; op++) + { + know ((op->opcode & op->mask) == op->opcode); + + if ((op->flags & i370_cpu) != 0) + { + const char *retval; + + retval = hash_insert (i370_hash, op->name, (PTR) op); + if (retval != (const char *) NULL) + { + as_bad ("Internal assembler error for instruction %s", op->name); + dup_insn = true; + } + } + } + + /* Insert the macros into a hash table. */ + i370_macro_hash = hash_new (); + + macro_end = i370_macros + i370_num_macros; + for (macro = i370_macros; macro < macro_end; macro++) + { + if ((macro->flags & i370_cpu) != 0) + { + const char *retval; + + retval = hash_insert (i370_macro_hash, macro->name, (PTR) macro); + if (retval != (const char *) NULL) + { + as_bad ("Internal assembler error for macro %s", macro->name); + dup_insn = true; + } + } + } + + if (dup_insn) + abort (); +} + +/* Insert an operand value into an instruction. */ + +static i370_insn_t +i370_insert_operand (insn, operand, val) + i370_insn_t insn; + const struct i370_operand *operand; + offsetT val; +{ + if (operand->insert) + { + const char *errmsg; + + /* used for 48-bit insn's */ + errmsg = NULL; + insn = (*operand->insert) (insn, (long) val, &errmsg); + if (errmsg) + as_bad ("%s", errmsg); + } + else + { + /* this is used only for 16, 32 bit insn's */ + insn.i[0] |= (((long) val & ((1 << operand->bits) - 1)) + << operand->shift); + } + + return insn; +} + + +#ifdef OBJ_ELF +/* Parse @got, etc. and return the desired relocation. + * Currently, i370 does not support (don't really need to support) any + * of these fancier markups ... for example, no one is going to + * write 'L 6,=V(bogus)@got' it just doesn't make sense (at least to me). + * So basically, we could get away with this routine returning + * BFD_RELOC_UNUSED in all circumstances. However, I'll leave + * in for now in case someone ambitious finds a good use for this stuff ... + * this routine was pretty much just copied from the powerpc code ... + */ +static bfd_reloc_code_real_type +i370_elf_suffix (str_p, exp_p) + char **str_p; + expressionS *exp_p; +{ + struct map_bfd + { + char *string; + int length; + bfd_reloc_code_real_type reloc; + }; + + char ident[20]; + char *str = *str_p; + char *str2; + int ch; + int len; + struct map_bfd *ptr; + +#define MAP(str,reloc) { str, sizeof(str)-1, reloc } + + static struct map_bfd mapping[] = + { + // MAP ("l", BFD_RELOC_LO16), + // MAP ("h", BFD_RELOC_HI16), + // MAP ("ha", BFD_RELOC_HI16_S), + MAP ("fixup", BFD_RELOC_CTOR), /* warnings with -mrelocatable */ + { (char *)0, 0, BFD_RELOC_UNUSED } + }; + + if (*str++ != '@') + return BFD_RELOC_UNUSED; + + for (ch = *str, str2 = ident; + (str2 < ident + sizeof (ident) - 1 + && (isalnum (ch) || ch == '@')); + ch = *++str) + { + *str2++ = (islower (ch)) ? ch : tolower (ch); + } + + *str2 = '\0'; + len = str2 - ident; + + ch = ident[0]; + for (ptr = &mapping[0]; ptr->length > 0; ptr++) + if (ch == ptr->string[0] + && len == ptr->length + && memcmp (ident, ptr->string, ptr->length) == 0) + { + if (exp_p->X_add_number != 0 + && (ptr->reloc == BFD_RELOC_16_GOTOFF + || ptr->reloc == BFD_RELOC_LO16_GOTOFF + || ptr->reloc == BFD_RELOC_HI16_GOTOFF + || ptr->reloc == BFD_RELOC_HI16_S_GOTOFF)) + as_warn ("identifier+constant@got means identifier@got+constant"); + + /* Now check for identifier@suffix+constant */ + if (*str == '-' || *str == '+') + { + char *orig_line = input_line_pointer; + expressionS new_exp; + + input_line_pointer = str; + expression (&new_exp); + if (new_exp.X_op == O_constant) + { + exp_p->X_add_number += new_exp.X_add_number; + str = input_line_pointer; + } + + if (&input_line_pointer != str_p) + input_line_pointer = orig_line; + } + + *str_p = str; + return ptr->reloc; + } + + return BFD_RELOC_UNUSED; +} + +/* Like normal .long/.short/.word, except support @got, etc. */ +/* clobbers input_line_pointer, checks end-of-line. */ +static void +i370_elf_cons (nbytes) + register int nbytes; /* 1=.byte, 2=.word, 4=.long */ +{ + expressionS exp; + bfd_reloc_code_real_type reloc; + + if (is_it_end_of_statement ()) + { + demand_empty_rest_of_line (); + return; + } + + do + { + expression (&exp); + if (exp.X_op == O_symbol + && *input_line_pointer == '@' + && (reloc = i370_elf_suffix (&input_line_pointer, &exp)) != BFD_RELOC_UNUSED) + { + reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput, reloc); + int size = bfd_get_reloc_size (reloc_howto); + + if (size > nbytes) + as_bad ("%s relocations do not fit in %d bytes\n", reloc_howto->name, nbytes); + + else + { + register char *p = frag_more ((int) nbytes); + int offset = nbytes - size; + + fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size, &exp, 0, reloc); + } + } + else + emit_expr (&exp, (unsigned int) nbytes); + } + while (*input_line_pointer++ == ','); + + input_line_pointer--; /* Put terminator back into stream. */ + demand_empty_rest_of_line (); +} + + +/* ASCII to EBCDIC conversion table. */ +static unsigned char ascebc[256] = +{ + /*00 NL SH SX EX ET NQ AK BL */ + 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, + /*08 BS HT LF VT FF CR SO SI */ + 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + /*10 DL D1 D2 D3 D4 NK SN EB */ + 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, + /*18 CN EM SB EC FS GS RS US */ + 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, + /*20 SP ! " # $ % & ' */ + 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, + /*28 ( ) * + , - . / */ + 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, + /*30 0 1 2 3 4 5 6 7 */ + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, + /*38 8 9 : ; < = > ? */ + 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F, + /*40 @ A B C D E F G */ + 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, + /*48 H I J K L M N O */ + 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, + /*50 P Q R S T U V W */ + 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, + /*58 X Y Z [ \ ] ^ _ */ + 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D, + /*60 ` a b c d e f g */ + 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + /*68 h i j k l m n o */ + 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, + /*70 p q r s t u v w */ + 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + /*78 x y z { | } ~ DL */ + 0xA7, 0xA8, 0xA9, 0xC0, 0x4F, 0xD0, 0xA1, 0x07, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0xFF +}; + +/* EBCDIC to ASCII conversion table. */ +unsigned char ebcasc[256] = +{ + /*00 NU SH SX EX PF HT LC DL */ + 0x00, 0x01, 0x02, 0x03, 0x00, 0x09, 0x00, 0x7F, + /*08 SM VT FF CR SO SI */ + 0x00, 0x00, 0x00, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + /*10 DE D1 D2 TM RS NL BS IL */ + 0x10, 0x11, 0x12, 0x13, 0x14, 0x0A, 0x08, 0x00, + /*18 CN EM CC C1 FS GS RS US */ + 0x18, 0x19, 0x00, 0x00, 0x1C, 0x1D, 0x1E, 0x1F, + /*20 DS SS FS BP LF EB EC */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x17, 0x1B, + /*28 SM C2 EQ AK BL */ + 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x07, 0x00, + /*30 SY PN RS UC ET */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, + /*38 C3 D4 NK SU */ + 0x00, 0x00, 0x00, 0x00, 0x14, 0x15, 0x00, 0x1A, + /*40 SP */ + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /*48 . < ( + | */ + 0x00, 0x00, 0x00, 0x2E, 0x3C, 0x28, 0x2B, 0x7C, + /*50 & */ + 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /*58 ! $ * ) ; ^ */ + 0x00, 0x00, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0x5E, + /*60 - / */ + 0x2D, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /*68 , % _ > ? */ + 0x00, 0x00, 0x00, 0x2C, 0x25, 0x5F, 0x3E, 0x3F, + /*70 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /*78 ` : # @ ' = " */ + 0x00, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22, + /*80 a b c d e f g */ + 0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + /*88 h i { */ + 0x68, 0x69, 0x00, 0x7B, 0x00, 0x00, 0x00, 0x00, + /*90 j k l m n o p */ + 0x00, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, + /*98 q r } */ + 0x71, 0x72, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x00, + /*A0 ~ s t u v w x */ + 0x00, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, + /*A8 y z [ */ + 0x79, 0x7A, 0x00, 0x00, 0x00, 0x5B, 0x00, 0x00, + /*B0 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /*B8 ] */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0x00, 0x00, + /*C0 { A B C D E F G */ + 0x7B, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + /*C8 H I */ + 0x48, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /*D0 } J K L M N O P */ + 0x7D, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, + /*D8 Q R */ + 0x51, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /*E0 \ S T U V W X */ + 0x5C, 0x00, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + /*E8 Y Z */ + 0x59, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /*F0 0 1 2 3 4 5 6 7 */ + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + /*F8 8 9 */ + 0x38, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF +}; + +/* ebcdic translation tables needed for 3270 support */ +static void +i370_ebcdic (unused) + int unused; +{ + char *p, *end; + char delim = 0; + size_t nbytes; + + nbytes = strlen (input_line_pointer); + end = input_line_pointer + nbytes; + while ('\r' == *end) end --; + while ('\n' == *end) end --; + + delim = *input_line_pointer; + if (('\'' == delim) || ('\"' == delim)) { + input_line_pointer ++; + end = rindex (input_line_pointer, delim); + } + + if (end > input_line_pointer) + { + nbytes = end - input_line_pointer +1; + p = frag_more (nbytes); + while (end > input_line_pointer) + { + *p = ascebc [(unsigned char)(*input_line_pointer)]; + ++p; ++input_line_pointer; + } + *p = '\0'; + } + if (delim == *input_line_pointer) ++input_line_pointer; +} + + +/* stub out a couple of routines */ +static void +i370_rmode (unused) + int unused; +{ + as_tsktsk ("rmode ignored"); +} + +static void +i370_dsect (sect) + int sect; +{ + char *save_line = input_line_pointer; + static char section[] = ".data\n"; + + /* Just pretend this is .section .data */ + input_line_pointer = section; + obj_elf_section (sect); + + input_line_pointer = save_line; +} + +static void +i370_csect (unused) + int unused; +{ + as_tsktsk ("csect not supported"); +} + + +/* DC Define Const is only partially supported. + * For samplecode on what to do, look at i370_elf_cons() above. + * This code handles pseudoops of the style + * DC D'3.141592653' # in sysv4, .double 3.14159265 + * DC F'1' # in sysv4, .long 1 + */ +static void +i370_dc(unused) + int unused; +{ + char * p, tmp[50]; + int nbytes=0; + expressionS exp; + char type=0; + + if (is_it_end_of_statement ()) + { + demand_empty_rest_of_line (); + return; + } + + /* figure out the size */ + type = *input_line_pointer++; + switch (type) + { + case 'H': /* 16-bit */ + nbytes = 2; + break; + case 'E': /* 32-bit */ + case 'F': /* 32-bit */ + nbytes = 4; + break; + case 'D': /* 64-bit */ + nbytes = 8; + break; + default: + as_bad ("unsupported DC type"); + return; + } + + /* get rid of pesky quotes */ + if ('\'' == *input_line_pointer) + { + char * close; + ++input_line_pointer; + close = strchr (input_line_pointer, '\''); + if (close) + *close= ' '; + else + as_bad ("missing end-quote"); + } + if ('\"' == *input_line_pointer) + { + char * close; + ++input_line_pointer; + close = strchr (input_line_pointer, '\"'); + if (close) + *close= ' '; + else + as_bad ("missing end-quote"); + } + + switch (type) + { + case 'H': /* 16-bit */ + case 'F': /* 32-bit */ + expression (&exp); + emit_expr (&exp, nbytes); + break; + case 'E': /* 32-bit */ + case 'D': /* 64-bit */ + md_atof (type, tmp, &nbytes); + p = frag_more (nbytes); + memcpy (p, tmp, nbytes); + break; + default: + as_bad ("unsupported DC type"); + return; + } + + demand_empty_rest_of_line (); +} + + +/* provide minimal support for DS Define Storage */ +static void +i370_ds (unused) + int unused; +{ + /* DS 0H or DS 0F or DS 0D */ + if ('0' == *input_line_pointer) + { + int alignment = 0; /* left shift 1<<align */ + input_line_pointer ++; + switch (*input_line_pointer++) + { + case 'H': /* 16-bit */ + alignment = 1; + break; + case 'F': /* 32-bit */ + alignment = 2; + break; + case 'D': /* 64-bit */ + alignment = 3; + break; + default: + as_bad ("unsupported alignment"); + return; + } + frag_align (alignment, 0, 0); + record_alignment (now_seg, alignment); + } + else + { + as_bad ("this DS form not yet supported"); + } +} + +/* Solaris pseudo op to change to the .rodata section. */ +static void +i370_elf_rdata (sect) + int sect; +{ + char *save_line = input_line_pointer; + static char section[] = ".rodata\n"; + + /* Just pretend this is .section .rodata */ + input_line_pointer = section; + obj_elf_section (sect); + + input_line_pointer = save_line; +} + +/* Pseudo op to make file scope bss items */ +static void +i370_elf_lcomm(unused) + int unused; +{ + register char *name; + register char c; + register char *p; + offsetT size; + register symbolS *symbolP; + offsetT align; + segT old_sec; + int old_subsec; + char *pfrag; + int align2; + + name = input_line_pointer; + c = get_symbol_end (); + + /* just after name is now '\0' */ + p = input_line_pointer; + *p = c; + SKIP_WHITESPACE (); + if (*input_line_pointer != ',') + { + as_bad ("Expected comma after symbol-name: rest of line ignored."); + ignore_rest_of_line (); + return; + } + + input_line_pointer++; /* skip ',' */ + if ((size = get_absolute_expression ()) < 0) + { + as_warn (".COMMon length (%ld.) <0! Ignored.", (long) size); + ignore_rest_of_line (); + return; + } + + /* The third argument to .lcomm is the alignment. */ + if (*input_line_pointer != ',') + align = 8; + else + { + ++input_line_pointer; + align = get_absolute_expression (); + if (align <= 0) + { + as_warn ("ignoring bad alignment"); + align = 8; + } + } + + *p = 0; + symbolP = symbol_find_or_make (name); + *p = c; + + if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP)) + { + as_bad ("Ignoring attempt to re-define symbol `%s'.", + S_GET_NAME (symbolP)); + ignore_rest_of_line (); + return; + } + + if (S_GET_VALUE (symbolP) && S_GET_VALUE (symbolP) != (valueT) size) + { + as_bad ("Length of .lcomm \"%s\" is already %ld. Not changed to %ld.", + S_GET_NAME (symbolP), + (long) S_GET_VALUE (symbolP), + (long) size); + + ignore_rest_of_line (); + return; + } + + /* allocate_bss: */ + old_sec = now_seg; + old_subsec = now_subseg; + if (align) + { + /* convert to a power of 2 alignment */ + for (align2 = 0; (align & 1) == 0; align >>= 1, ++align2) + ; + if (align != 1) + { + as_bad ("Common alignment not a power of 2"); + ignore_rest_of_line (); + return; + } + } + else + align2 = 0; + + record_alignment (bss_section, align2); + subseg_set (bss_section, 0); + if (align2) + frag_align (align2, 0, 0); + if (S_GET_SEGMENT (symbolP) == bss_section) + symbol_get_frag (symbolP)->fr_symbol = 0; + symbol_set_frag (symbolP, frag_now); + pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, size, + (char *) 0); + *pfrag = 0; + S_SET_SIZE (symbolP, size); + S_SET_SEGMENT (symbolP, bss_section); + subseg_set (old_sec, old_subsec); + demand_empty_rest_of_line (); +} + +/* Validate any relocations emitted for -mrelocatable, possibly adding + fixups for word relocations in writable segments, so we can adjust + them at runtime. */ +static void +i370_elf_validate_fix (fixp, seg) + fixS *fixp; + segT seg; +{ + if (fixp->fx_done || fixp->fx_pcrel) + return; + + switch (shlib) + { + case SHLIB_NONE: + case SHLIB_PIC: + return; + + case SHILB_MRELOCATABLE: + if (fixp->fx_r_type <= BFD_RELOC_UNUSED + && fixp->fx_r_type != BFD_RELOC_16_GOTOFF + && fixp->fx_r_type != BFD_RELOC_HI16_GOTOFF + && fixp->fx_r_type != BFD_RELOC_LO16_GOTOFF + && fixp->fx_r_type != BFD_RELOC_HI16_S_GOTOFF + && fixp->fx_r_type != BFD_RELOC_32_BASEREL + && fixp->fx_r_type != BFD_RELOC_LO16_BASEREL + && fixp->fx_r_type != BFD_RELOC_HI16_BASEREL + && fixp->fx_r_type != BFD_RELOC_HI16_S_BASEREL + && strcmp (segment_name (seg), ".got2") != 0 + && strcmp (segment_name (seg), ".dtors") != 0 + && strcmp (segment_name (seg), ".ctors") != 0 + && strcmp (segment_name (seg), ".fixup") != 0 + && strcmp (segment_name (seg), ".stab") != 0 + && strcmp (segment_name (seg), ".gcc_except_table") != 0 + && strcmp (segment_name (seg), ".ex_shared") != 0) + { + if ((seg->flags & (SEC_READONLY | SEC_CODE)) != 0 + || fixp->fx_r_type != BFD_RELOC_CTOR) + { + as_bad_where (fixp->fx_file, fixp->fx_line, + "Relocation cannot be done when using -mrelocatable"); + } + } + return; + } +} +#endif /* OBJ_ELF */ + + + +#define LITERAL_POOL_SUPPORT +#ifdef LITERAL_POOL_SUPPORT +/* Provide support for literal pools within the text section. */ +/* Loosely based on similar code from tc-arm.c */ +/* + * We will use four symbols to locate four parts of the literal pool. + * These four sections contain 64,32,16 and 8-bit constants; we use + * four sections so that all memory access can be appropriately aligned. + * That is, we want to avoid mixing these together so that we don't + * waste space padding out to alignments. The four pointers + * longlong_poolP, word_poolP, etc. point to a symbol labeling the + * start of each pool part. + * + * lit_pool_num increments from zero to infinity and uniquely id's + * -- its used to generate the *_poolP symbol name. + */ + +#define MAX_LITERAL_POOL_SIZE 1024 + +typedef struct literalS +{ + struct expressionS exp; + char * sym_name; + char size; /* 1,2,4 or 8 */ + short offset; +} literalT; + +literalT literals[MAX_LITERAL_POOL_SIZE]; +int next_literal_pool_place = 0; /* Next free entry in the pool */ + +static symbolS *longlong_poolP = NULL; /* 64-bit pool entries */ +static symbolS *word_poolP = NULL; /* 32-bit pool entries */ +static symbolS *short_poolP = NULL; /* 16-bit pool entries */ +static symbolS *byte_poolP = NULL; /* 8-bit pool entries */ + +static int lit_pool_num = 1; + +/* create a new, empty symbol */ +static symbolS * +symbol_make_empty (void) +{ + return symbol_create (FAKE_LABEL_NAME, undefined_section, + (valueT) 0, &zero_address_frag); +} + +/* add an expression to the literal pool */ +static void +add_to_lit_pool (expressionS *exx, char *name, int sz) +{ + int lit_count = 0; + int offset_in_pool = 0; + + /* start a new pool, if necessary */ + if (8 == sz && NULL == longlong_poolP) + longlong_poolP = symbol_make_empty(); + else if (4 == sz && NULL == word_poolP) + word_poolP = symbol_make_empty(); + else if (2 == sz && NULL == short_poolP) + short_poolP = symbol_make_empty(); + else if (1 == sz && NULL == byte_poolP) + byte_poolP = symbol_make_empty(); + + /* Check if this literal value is already in the pool: */ + /* hack alert -- we should probably be checking expressions + * of type O_symbol as well ... */ + /* hack alert XXX this is probably(certainly?) broken for O_big, + * which includes 64-bit long-longs ... + */ + while (lit_count < next_literal_pool_place) + { + if (exx->X_op == O_constant + && literals[lit_count].exp.X_op == exx->X_op + && literals[lit_count].exp.X_add_number == exx->X_add_number + && literals[lit_count].exp.X_unsigned == exx->X_unsigned + && literals[lit_count].size == sz) + break; + else if (literals[lit_count].sym_name + && name + && !strcmp (name, literals[lit_count].sym_name)) + break; + if (sz == literals[lit_count].size) + offset_in_pool += sz; + lit_count ++; + } + + if (lit_count == next_literal_pool_place) /* new entry */ + { + if (next_literal_pool_place > MAX_LITERAL_POOL_SIZE) + { + as_bad("Literal Pool Overflow"); + } + + literals[next_literal_pool_place].exp = *exx; + literals[next_literal_pool_place].size = sz; + literals[next_literal_pool_place].offset = offset_in_pool; + if (name) + { + literals[next_literal_pool_place].sym_name = strdup (name); + } + else + { + literals[next_literal_pool_place].sym_name = NULL; + } + next_literal_pool_place++; + } + + /* ???_poolP points to the begining of the literal pool. + * X_add_number is the offset from the begining of the + * literal pool to this expr minus the location of the most + * recent .using directive. Thus, the grand total value of the + * expression is the distance from .using to the literal. + */ + if (8 == sz) + exx->X_add_symbol = longlong_poolP; + else if (4 == sz) + exx->X_add_symbol = word_poolP; + else if (2 == sz) + exx->X_add_symbol = short_poolP; + else if (1 == sz) + exx->X_add_symbol = byte_poolP; + exx->X_add_number = offset_in_pool; + exx->X_op_symbol = NULL; + + /* If the user has set up a base reg in another section, + * use that; otherwise use the text section. */ + if (0 < i370_using_other_regno) + { + i370_make_relative (exx, &i370_using_other_baseaddr); + } + else + { + i370_make_relative (exx, &i370_using_text_baseaddr); + } +} + +/* The symbol setup for the literal pool is done in two steps. First, + * a symbol that represents the start of the literal pool is created, + * above, in the add_to_pool() routine. This sym ???_poolP. + * However, we don't know what fragment its in until a bit later. + * So we defer the frag_now thing, and the symbol name, until .ltorg time + */ + +/* Can't use symbol_new here, so have to create a symbol and then at + a later date assign it a value. Thats what these functions do */ +static void +symbol_locate (symbolP, name, segment, valu, frag) + symbolS *symbolP; + CONST char *name; /* It is copied, the caller can modify */ + segT segment; /* Segment identifier (SEG_<something>) */ + valueT valu; /* Symbol value */ + fragS *frag; /* Associated fragment */ +{ + size_t name_length; + char *preserved_copy_of_name; + + name_length = strlen (name) + 1; /* +1 for \0 */ + obstack_grow (¬es, name, name_length); + preserved_copy_of_name = obstack_finish (¬es); + + S_SET_NAME (symbolP, preserved_copy_of_name); + + S_SET_SEGMENT (symbolP, segment); + S_SET_VALUE (symbolP, valu); + symbol_clear_list_pointers(symbolP); + + symbol_set_frag (symbolP, frag); + + /* + * Link to end of symbol chain. + */ + { + extern int symbol_table_frozen; + if (symbol_table_frozen) + abort (); + } + + symbol_append (symbolP, symbol_lastP, &symbol_rootP, &symbol_lastP); + + obj_symbol_new_hook (symbolP); + +#ifdef tc_symbol_new_hook + tc_symbol_new_hook (symbolP); +#endif + +#define DEBUG_SYMS +#ifdef DEBUG_SYMS + verify_symbol_chain(symbol_rootP, symbol_lastP); +#endif /* DEBUG_SYMS */ +} + +/* i370_addr_offset() will convert operand expressions + * that appear to be absolute into thier base-register + * relative form. These expressions come in two types: + * + * (1) of the form "* + const" * where "*" means + * relative offset since the last using + * i.e. "*" means ".-using_baseaddr" + * + * (2) labels, which are never absolute, but are always + * relative to the last "using". Anything with an alpha + * character is considered to be a label (since symbols + * can never be operands), and since we've already handled + * register operands. For example, "BL .L33" branch low + * to .L33 RX form insn frequently terminates for-loops, + */ +static boolean +i370_addr_offset (expressionS *exx) +{ + char *dot, *lab; + int islabel = 0; + int all_digits = 0; + + /* search for a label; anything with an alpha char will do */ + /* local labels consist of N digits followed by either b or f */ + lab = input_line_pointer; + while (*lab && (',' != *lab) && ('(' != *lab)) + { + if (isdigit(*lab)) + { + all_digits = 1; + } + else if (isalpha(*lab)) + { + if (!all_digits) + { + islabel = 1; + break; + } + else if (('f' == *lab) || ('b' == *lab)) + { + islabel = 1; + break; + } + if (all_digits) + break; + } + else if ('.' != *lab) + break; + ++lab; + } + + /* See if operand has a * in it */ + dot = strchr (input_line_pointer, '*'); + + if (!dot && !islabel) + return false; + + /* replace * with . and let expr munch on it. */ + if (dot) + *dot = '.'; + expression (exx); + + /* OK, now we have to subtract the "using" location */ + /* normally branches appear in the text section only... */ + if (0 == strncmp (now_seg->name, ".text", 5) || 0 > i370_using_other_regno) + { + i370_make_relative (exx, &i370_using_text_baseaddr); + } + else + { + i370_make_relative (exx, &i370_using_other_baseaddr); + } + + /* put the * back */ + if (dot) + *dot = '*'; + + return true; +} + +/* handle address constants of various sorts */ +/* The currently supported types are + * =A(some_symb) + * =V(some_extern) + * =X'deadbeef' hexadecimal + * =F'1234' 32-bit const int + * =H'1234' 16-bit const int + */ +static boolean +i370_addr_cons (expressionS *exp) +{ + char *name; + char *sym_name, delim; + int name_len; + int hex_len=0; + int cons_len=0; + + name = input_line_pointer; + sym_name = input_line_pointer; + /* Find the spelling of the operand */ + if (name[0] == '=' && isalpha (name[1])) + { + name = ++input_line_pointer; + } + else + { + return false; + } + switch (name[0]) + { + case 'A': + case 'V': + /* A == address-of */ + /* V == extern */ + ++input_line_pointer; + expression (exp); + + /* we use a simple string name to collapse together + * multiple refrences to the same address literal + */ + name_len = strcspn (sym_name, ", "); + delim = *(sym_name + name_len); + *(sym_name + name_len) = 0x0; + add_to_lit_pool (exp, sym_name, 4); + *(sym_name + name_len) = delim; + + break; + case 'H': + case 'F': + case 'X': + case 'E': /* single-precision float point */ + case 'D': /* double-precision float point */ + + /* H == 16-bit fixed-point const; expression must be const */ + /* F == fixed-point const; expression must be const */ + /* X == fixed-point const; expression must be const */ + if ('H' == name[0]) cons_len = 2; + else if ('F' == name[0]) cons_len = 4; + else if ('X' == name[0]) cons_len = -1; + else if ('E' == name[0]) cons_len = 4; + else if ('D' == name[0]) cons_len = 8; + + /* extract length, if it is present; hack alert -- assume single-digit + * length */ + if ('L' == name[1]) + { + cons_len = name[2] - '0'; /* should work for ascii and ebcdic */ + input_line_pointer += 2; + } + + ++input_line_pointer; + + /* get rid of pesky quotes */ + if ('\'' == *input_line_pointer) + { + char * close; + ++input_line_pointer; + close = strchr (input_line_pointer, '\''); + if (close) + *close= ' '; + else + as_bad ("missing end-quote"); + } + if ('\"' == *input_line_pointer) + { + char * close; + ++input_line_pointer; + close = strchr (input_line_pointer, '\"'); + if (close) + *close= ' '; + else + as_bad ("missing end-quote"); + } + if (('X' == name[0]) || ('E' == name[0]) || ('D' == name[0])) + { + char tmp[50]; + char *save; + + /* The length of hex constants is specified directly with L, + * or implied through the number of hex digits. For example: + * =X'AB' one byte + * =X'abcd' two bytes + * =X'000000AB' four bytes + * =XL4'AB' four bytes, left-padded withn zero + */ + if (('X' == name[0]) && (0 > cons_len)) + { + save = input_line_pointer; + while (*save) + { + if (isxdigit(*save)) + hex_len++; + save++; + } + cons_len = (hex_len+1) /2; + } + /* I beleive this works even for =XL8'dada0000beeebaaa' + * which should parse out to X_op == O_big + * Note that floats and doubles get represented as + * 0d3.14159265358979 or 0f 2.7 + */ + tmp[0] = '0'; + tmp[1] = name[0]; + tmp[2] = 0; + strcat (tmp, input_line_pointer); + save = input_line_pointer; + input_line_pointer = tmp; + expression (exp); + input_line_pointer = save + (input_line_pointer-tmp-2); + + /* fix up lengths for floats and doubles */ + if (O_big == exp->X_op) + { + exp->X_add_number = cons_len / CHARS_PER_LITTLENUM; + } + } + else + { + expression (exp); + } + /* O_big occurs when more than 4 bytes worth gets parsed */ + if ((exp->X_op != O_constant) && (exp->X_op != O_big)) + { + as_bad ("expression not a constant"); + return false; + } + add_to_lit_pool (exp, 0x0, cons_len); + break; + + default: + as_bad ("Unknown/unsupported address literal type"); + return false; + } + + return true; +} + + +/* Dump the contents of the literal pool that we've accumulated so far. + * This aligns the pool to the size of the largest literal in the pool. + */ + +static void +i370_ltorg (ignore) + int ignore; +{ + int litsize; + int lit_count = 0; + int biggest_literal_size = 0; + int biggest_align = 0; + char pool_name[20]; + + if (strncmp (now_seg->name, ".text", 5)) + { + if (i370_other_section == undefined_section) + { + as_bad (".ltorg without prior .using in section %s", + now_seg->name); + } + if (i370_other_section != now_seg) + { + as_bad (".ltorg in section %s paired to .using in section %s", + now_seg->name, i370_other_section->name); + } + } + if (! longlong_poolP + && ! word_poolP + && ! short_poolP + && ! byte_poolP) + { + /* Nothing to do */ + /* as_tsktsk ("Nothing to put in the pool\n"); */ + return; + } + + /* find largest literal .. 2 4 or 8 */ + lit_count = 0; + while (lit_count < next_literal_pool_place) + { + if (biggest_literal_size < literals[lit_count].size) + biggest_literal_size = literals[lit_count].size; + lit_count ++; + } + if (1 == biggest_literal_size) biggest_align = 0; + else if (2 == biggest_literal_size) biggest_align = 1; + else if (4 == biggest_literal_size) biggest_align = 2; + else if (8 == biggest_literal_size) biggest_align = 3; + else as_bad ("bad alignment of %d bytes in literal pool", biggest_literal_size); + if (0 == biggest_align) biggest_align = 1; + + + /* Align pool for short, word, double word accesses */ + frag_align (biggest_align, 0, 0); + record_alignment (now_seg, biggest_align); + + /* Note that the gas listing will print only the first five + * entries in the pool .... wonder how to make it print more ... + */ + /* output largest literals first, then the smaller ones. */ + for (litsize=8; litsize; litsize /=2) + { + symbolS *current_poolP = NULL; + switch (litsize) + { + case 8: + current_poolP = longlong_poolP; break; + case 4: + current_poolP = word_poolP; break; + case 2: + current_poolP = short_poolP; break; + case 1: + current_poolP = byte_poolP; break; + default: + as_bad ("bad literal size\n"); + } + if (NULL == current_poolP) + continue; + sprintf (pool_name, ".LITP%01d%06d", litsize, lit_pool_num); + symbol_locate (current_poolP, pool_name, now_seg, + (valueT) frag_now_fix (), frag_now); + symbol_table_insert (current_poolP); + + lit_count = 0; + while (lit_count < next_literal_pool_place) + { + if (litsize == literals[lit_count].size) + { +#define EMIT_ADDR_CONS_SYMBOLS +#ifdef EMIT_ADDR_CONS_SYMBOLS + /* create a bogus symbol, add it to the pool ... + * For the most part, I think this is a useless excercise, + * except that having these symbol names in the objects + * is vaguely useful for debugging ... + */ + if (literals[lit_count].sym_name) + { + symbolS * symP = symbol_make_empty(); + symbol_locate (symP, literals[lit_count].sym_name, now_seg, + (valueT) frag_now_fix (), frag_now); + symbol_table_insert (symP); + } +#endif /* EMIT_ADDR_CONS_SYMBOLS */ + + emit_expr (&(literals[lit_count].exp), literals[lit_count].size); + } + lit_count ++; + } + } + + next_literal_pool_place = 0; + longlong_poolP = NULL; + word_poolP = NULL; + short_poolP = NULL; + byte_poolP = NULL; + lit_pool_num++; +} + +#endif /* LITERAL_POOL_SUPPORT */ + + +/* add support for the HLASM-like USING directive to indicate + * the base register to use ... we don't support the full + * hlasm semantics for this ... we merely pluck a base address + * and a register number out. We print a warning if using is + * called multiple times. I suppose we should check to see + * if the regno is valid ... + */ +static void +i370_using (ignore) + int ignore; +{ + expressionS ex, baseaddr; + int iregno; + char *star; + + /* if "*" appears in a using, it means "." */ + /* replace it with "." so that expr doesn't get confused. */ + star = strchr (input_line_pointer, '*'); + if (star) + *star = '.'; + + /* the first arg to using will usually be ".", but it can + * be a more complex exprsssion too ... */ + expression (&baseaddr); + if (star) + *star = '*'; + if (O_constant != baseaddr.X_op + && O_symbol != baseaddr.X_op + && O_uminus != baseaddr.X_op) + { + as_bad (".using: base address expression illegal or too complex"); + } + + if (*input_line_pointer != '\0') ++input_line_pointer; + + /* the second arg to using had better be a register */ + register_name (&ex); + demand_empty_rest_of_line (); + iregno = ex.X_add_number; + + if (0 == strncmp (now_seg->name, ".text", 5)) + { + i370_using_text_baseaddr = baseaddr; + i370_using_text_regno = iregno; + } + else + { + i370_using_other_baseaddr = baseaddr; + i370_using_other_regno = iregno; + i370_other_section = now_seg; + } +} + +static void +i370_drop (ignore) + int ignore; +{ + expressionS ex; + int iregno; + + register_name (&ex); + demand_empty_rest_of_line (); + iregno = ex.X_add_number; + + if (0 == strncmp (now_seg->name, ".text", 5)) + { + if (iregno != i370_using_text_regno) + { + as_bad ("droping register %d in section %s does not match using register %d", + iregno, now_seg->name, i370_using_text_regno); + } + i370_using_text_regno = -1; + i370_using_text_baseaddr.X_op = O_absent; + } + else + { + if (iregno != i370_using_other_regno) + { + as_bad ("droping register %d in section %s does not match using register %d", + iregno, now_seg->name, i370_using_other_regno); + } + if (i370_other_section != now_seg) + { + as_bad ("droping register %d in section %s previously used in section %s", + iregno, now_seg->name, i370_other_section->name); + } + i370_using_other_regno = -1; + i370_using_other_baseaddr.X_op = O_absent; + i370_other_section = undefined_section; + } +} + +/* Make the first argument an address-relative expression + * by subtracting the second argument. + */ +static void +i370_make_relative (expressionS *exx, expressionS *baseaddr) +{ + + if (O_constant == baseaddr->X_op) + { + exx->X_op = O_symbol; + exx->X_add_number -= baseaddr->X_add_number; + } + else if (O_symbol == baseaddr->X_op) + { + exx->X_op = O_subtract; + exx->X_op_symbol = baseaddr->X_add_symbol; + exx->X_add_number -= baseaddr->X_add_number; + } + else if (O_uminus == baseaddr->X_op) + { + exx->X_op = O_add; + exx->X_op_symbol = baseaddr->X_add_symbol; + exx->X_add_number += baseaddr->X_add_number; + } + else + { + as_bad ("Missing or bad .using directive"); + } +} + +/* We need to keep a list of fixups. We can't simply generate them as + we go, because that would require us to first create the frag, and + that would screw up references to ``.''. */ + +struct i370_fixup +{ + expressionS exp; + int opindex; + bfd_reloc_code_real_type reloc; +}; + +#define MAX_INSN_FIXUPS (5) + +/* This routine is called for each instruction to be assembled. */ + +void +md_assemble (str) + char *str; +{ + char *s, *opcode_str; + const struct i370_opcode *opcode; + i370_insn_t insn; + const unsigned char *opindex_ptr; + int have_optional_index, have_optional_basereg, have_optional_reg; + int skip_optional_index, skip_optional_basereg, skip_optional_reg; + int use_text=0, use_other=0; + int off_by_one; + struct i370_fixup fixups[MAX_INSN_FIXUPS]; + int fc; + char *f; + int i; +#ifdef OBJ_ELF + bfd_reloc_code_real_type reloc; +#endif + + /* Get the opcode. */ + for (s = str; *s != '\0' && ! isspace (*s); s++) + ; + if (*s != '\0') + *s++ = '\0'; + opcode_str = str; + + /* Look up the opcode in the hash table. */ + opcode = (const struct i370_opcode *) hash_find (i370_hash, str); + if (opcode == (const struct i370_opcode *) NULL) + { + const struct i370_macro *macro; + + assert (i370_macro_hash); + macro = (const struct i370_macro *) hash_find (i370_macro_hash, str); + if (macro == (const struct i370_macro *) NULL) + as_bad ("Unrecognized opcode: `%s'", str); + else + i370_macro (s, macro); + + return; + } + + insn = opcode->opcode; + + str = s; + while (isspace (*str)) + ++str; + + /* I370 operands are either expressions or address constants. + Many operand types are optional. The optional operands + are always surrounded by parens, and are used to denote the base + register ... e.g. "A R1, D2" or "A R1, D2(,B2) as opposed to + the fully-formed "A R1, D2(X2,B2)". Note also the = sign, + such as A R1,=A(i) where the address-of operator =A implies + use of both a base register, and a missing index register. + + So, before we start seriously parsing the operands, we check + to see if we have an optional operand, and, if we do, we count + the number of commas to see which operand should be omitted. */ + + have_optional_index = have_optional_basereg = have_optional_reg = 0; + for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++) + { + const struct i370_operand *operand; + operand = &i370_operands[*opindex_ptr]; + if ((operand->flags & I370_OPERAND_INDEX) != 0) + have_optional_index = 1; + if ((operand->flags & I370_OPERAND_BASE) != 0) + have_optional_basereg = 1; + if ((operand->flags & I370_OPERAND_OPTIONAL) != 0) + have_optional_reg = 1; + } + + skip_optional_index = skip_optional_basereg = skip_optional_reg = 0; + if (have_optional_index || have_optional_basereg) + { + unsigned int opcount, nwanted; + + /* There is an optional operand. Count the number of + commas and open-parens in the input line. */ + if (*str == '\0') + opcount = 0; + else + { + opcount = 1; + s = str; + while ((s = strpbrk (s, ",(=")) != (char *) NULL) + { + ++opcount; + ++s; + if (',' == *s) ++s; /* avoid counting things like (, */ + if ('=' == *s) { ++s; --opcount; } + } + } + + /* If there are fewer operands in the line then are called + for by the instruction, we want to skip the optional + operand. */ + nwanted = strlen (opcode->operands); + if (have_optional_index) + { + if (opcount < nwanted) + skip_optional_index = 1; + if (have_optional_basereg && ((opcount+1) < nwanted)) + skip_optional_basereg = 1; + if (have_optional_reg && ((opcount+1) < nwanted)) + skip_optional_reg = 1; + } + else + { + if (have_optional_basereg && (opcount < nwanted)) + skip_optional_basereg = 1; + if (have_optional_reg && (opcount < nwanted)) + skip_optional_reg = 1; + } + } + + /* Perform some off-by-one hacks on the length field of certain instructions. + * Its such a shame to have to do this, but the problem is that HLASM got + * defined so that the lengths differ by one from the actual machine instructions. + * this code should probably be moved to a special inster-operand routine. + * Sigh. Affected instructions are Compare Logical, Move and Exclusive OR + * hack alert -- aren't *all* SS instructions affected ?? + */ + off_by_one = 0; + if (0 == strcasecmp ("CLC", opcode->name) + || 0 == strcasecmp ("ED", opcode->name) + || 0 == strcasecmp ("EDMK", opcode->name) + || 0 == strcasecmp ("MVC", opcode->name) + || 0 == strcasecmp ("MVCIN", opcode->name) + || 0 == strcasecmp ("MVN", opcode->name) + || 0 == strcasecmp ("MVZ", opcode->name) + || 0 == strcasecmp ("NC", opcode->name) + || 0 == strcasecmp ("OC", opcode->name) + || 0 == strcasecmp ("XC", opcode->name)) + off_by_one = 1; + + /* Gather the operands. */ + fc = 0; + for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++) + { + const struct i370_operand *operand; + const char *errmsg; + char *hold; + expressionS ex; + + operand = &i370_operands[*opindex_ptr]; + errmsg = NULL; + + /* If this is an index operand, and we are skipping it, + just insert a zero. */ + if (skip_optional_index && + ((operand->flags & I370_OPERAND_INDEX) != 0)) + { + insn = i370_insert_operand (insn, operand, 0); + continue; + } + + /* If this is the base operand, and we are skipping it, + just insert the current using basreg. */ + if (skip_optional_basereg && + ((operand->flags & I370_OPERAND_BASE) != 0)) + { + int basereg = -1; + if (use_text) + { + if (0 == strncmp (now_seg->name, ".text", 5) + || 0 > i370_using_other_regno) + { + basereg = i370_using_text_regno; + } + else + { + basereg = i370_using_other_regno; + } + } + else if (use_other) + { + if (0 > i370_using_other_regno) + { + basereg = i370_using_text_regno; + } + else + { + basereg = i370_using_other_regno; + } + } + if (0 > basereg) + { + as_bad ("not using any base register"); + } + insn = i370_insert_operand (insn, operand, basereg); + continue; + } + + /* If this is an optional operand, and we are skipping it, + Use zero (since a non-zero value would denote a register) */ + if (skip_optional_reg + && ((operand->flags & I370_OPERAND_OPTIONAL) != 0)) + { + insn = i370_insert_operand (insn, operand, 0); + continue; + } + + /* Gather the operand. */ + hold = input_line_pointer; + input_line_pointer = str; + + /* register names are only allowed where there are registers ... */ + if ((operand->flags & I370_OPERAND_GPR) != 0) + { + /* quickie hack to get past things like (,r13) */ + if (skip_optional_index && (',' == *input_line_pointer)) + { + *input_line_pointer = ' '; + input_line_pointer ++; + } + if (! register_name (&ex)) + { + as_bad ("expecting a register for operand %d", + opindex_ptr - opcode->operands + 1); + } + } + + /* check for a address constant expression */ + /* We will put PSW-relative addresses in the text section, + * and adress literals in the .data (or other) section. */ + else if (i370_addr_cons (&ex)) + use_other=1; + else if (i370_addr_offset (&ex)) + use_text=1; + else expression (&ex); + + str = input_line_pointer; + input_line_pointer = hold; + + /* perform some off-by-one hacks on the length field of certain instructions. + * Its such a shame to have to do this, but the problem is that HLASM got + * defined so that the programmer specifies a length that is one greater + * than what the machine instruction wants. + * Sigh. + */ + if (off_by_one && (0 == strcasecmp ("SS L", operand->name))) + { + ex.X_add_number --; + } + + if (ex.X_op == O_illegal) + as_bad ("illegal operand"); + else if (ex.X_op == O_absent) + as_bad ("missing operand"); + else if (ex.X_op == O_register) + { + insn = i370_insert_operand (insn, operand, ex.X_add_number); + } + else if (ex.X_op == O_constant) + { +#ifdef OBJ_ELF + /* Allow @HA, @L, @H on constants. + * Well actually, no we don't; there really don't make sense + * (at least not to me) for the i370. However, this code is + * left here for any dubious future expansion reasons ... */ + char *orig_str = str; + + if ((reloc = i370_elf_suffix (&str, &ex)) != BFD_RELOC_UNUSED) + switch (reloc) + { + default: + str = orig_str; + break; + + case BFD_RELOC_LO16: + /* X_unsigned is the default, so if the user has done + something which cleared it, we always produce a + signed value. */ + ex.X_add_number = (((ex.X_add_number & 0xffff) + ^ 0x8000) + - 0x8000); + break; + + case BFD_RELOC_HI16: + ex.X_add_number = (ex.X_add_number >> 16) & 0xffff; + break; + + case BFD_RELOC_HI16_S: + ex.X_add_number = (((ex.X_add_number >> 16) & 0xffff) + + ((ex.X_add_number >> 15) & 1)); + break; + } +#endif + insn = i370_insert_operand (insn, operand, ex.X_add_number); + } +#ifdef OBJ_ELF + else if ((reloc = i370_elf_suffix (&str, &ex)) != BFD_RELOC_UNUSED) + { + as_tsktsk ("md_assemble(): suffixed relocations not supported\n"); + + /* We need to generate a fixup for this expression. */ + if (fc >= MAX_INSN_FIXUPS) + as_fatal ("too many fixups"); + fixups[fc].exp = ex; + fixups[fc].opindex = 0; + fixups[fc].reloc = reloc; + ++fc; + } +#endif /* OBJ_ELF */ + + else + { + /* We need to generate a fixup for this expression. */ + /* Typically, the expression will just be a symbol ... + * printf ("insn %s needs fixup for %s \n", + * opcode->name, ex.X_add_symbol->bsym->name); + */ + + if (fc >= MAX_INSN_FIXUPS) + as_fatal ("too many fixups"); + fixups[fc].exp = ex; + fixups[fc].opindex = *opindex_ptr; + fixups[fc].reloc = BFD_RELOC_UNUSED; + ++fc; + } + + /* skip over delimiter (close paren, or comma) */ + if ((')' == *str) && (',' == *(str+1))) + ++str; + if (*str != '\0') + ++str; + } + + while (isspace (*str)) + ++str; + + if (*str != '\0') + as_bad ("junk at end of line: `%s'", str); + + /* Write out the instruction. */ + f = frag_more (opcode->len); + if (4 >= opcode->len) + { + md_number_to_chars (f, insn.i[0], opcode->len); + } + else + { + md_number_to_chars (f, insn.i[0], 4); + if (6 == opcode->len) + { + md_number_to_chars ((f+4), ((insn.i[1])>>16), 2); + } + else + { + /* not used --- don't have any 8 byte instructions */ + as_bad ("Internal Error: bad instruction length"); + md_number_to_chars ((f+4), insn.i[1], opcode->len -4); + } + } + + /* Create any fixups. At this point we do not use a + bfd_reloc_code_real_type, but instead just use the + BFD_RELOC_UNUSED plus the operand index. This lets us easily + handle fixups for any operand type, although that is admittedly + not a very exciting feature. We pick a BFD reloc type in + md_apply_fix. */ + for (i = 0; i < fc; i++) + { + const struct i370_operand *operand; + + operand = &i370_operands[fixups[i].opindex]; + if (fixups[i].reloc != BFD_RELOC_UNUSED) + { + reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput, fixups[i].reloc); + int size; + fixS *fixP; + + if (!reloc_howto) + abort (); + + size = bfd_get_reloc_size (reloc_howto); + + if (size < 1 || size > 4) + abort(); + + printf (" gwana doo fixup %d \n", i); + fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size, + &fixups[i].exp, reloc_howto->pc_relative, + fixups[i].reloc); + + /* Turn off complaints that the addend is too large for things like + foo+100000@ha. */ + switch (fixups[i].reloc) + { + case BFD_RELOC_16_GOTOFF: + case BFD_RELOC_LO16: + case BFD_RELOC_HI16: + case BFD_RELOC_HI16_S: + fixP->fx_no_overflow = 1; + break; + default: + break; + } + } + else + { + fix_new_exp (frag_now, f - frag_now->fr_literal, opcode->len, + &fixups[i].exp, + (operand->flags & I370_OPERAND_RELATIVE) != 0, + ((bfd_reloc_code_real_type) + (fixups[i].opindex + (int) BFD_RELOC_UNUSED))); + } + } +} + +/* Handle a macro. Gather all the operands, transform them as + described by the macro, and call md_assemble recursively. All the + operands are separated by commas; we don't accept parentheses + around operands here. */ + +static void +i370_macro (str, macro) + char *str; + const struct i370_macro *macro; +{ + char *operands[10]; + unsigned int count; + char *s; + unsigned int len; + const char *format; + int arg; + char *send; + char *complete; + + /* Gather the users operands into the operands array. */ + count = 0; + s = str; + while (1) + { + if (count >= sizeof operands / sizeof operands[0]) + break; + operands[count++] = s; + s = strchr (s, ','); + if (s == (char *) NULL) + break; + *s++ = '\0'; + } + + if (count != macro->operands) + { + as_bad ("wrong number of operands"); + return; + } + + /* Work out how large the string must be (the size is unbounded + because it includes user input). */ + len = 0; + format = macro->format; + while (*format != '\0') + { + if (*format != '%') + { + ++len; + ++format; + } + else + { + arg = strtol (format + 1, &send, 10); + know (send != format && arg >= 0 && arg < count); + len += strlen (operands[arg]); + format = send; + } + } + + /* Put the string together. */ + complete = s = (char *) alloca (len + 1); + format = macro->format; + while (*format != '\0') + { + if (*format != '%') + *s++ = *format++; + else + { + arg = strtol (format + 1, &send, 10); + strcpy (s, operands[arg]); + s += strlen (s); + format = send; + } + } + *s = '\0'; + + /* Assemble the constructed instruction. */ + md_assemble (complete); +} + +#ifdef OBJ_ELF +/* For ELF, add support for SHF_EXCLUDE and SHT_ORDERED */ + +int +i370_section_letter (letter, ptr_msg) + int letter; + char **ptr_msg; +{ + if (letter == 'e') + return SHF_EXCLUDE; + + *ptr_msg = "Bad .section directive: want a,w,x,e in string"; + return 0; +} + +int +i370_section_word (str, len) + char *str; + size_t len; +{ + if (len == 7 && strncmp (str, "exclude", 7) == 0) + return SHF_EXCLUDE; + + return -1; +} + +int +i370_section_type (str, len) + char *str; + size_t len; +{ + if (len == 7 && strncmp (str, "ordered", 7) == 0) + return SHT_ORDERED; + + return -1; +} + +int +i370_section_flags (flags, attr, type) + int flags; + int attr; + int type; +{ + if (type == SHT_ORDERED) + flags |= SEC_ALLOC | SEC_LOAD | SEC_SORT_ENTRIES; + + if (attr & SHF_EXCLUDE) + flags |= SEC_EXCLUDE; + + return flags; +} +#endif /* OBJ_ELF */ + + +/* Pseudo-op handling. */ + +/* The .byte pseudo-op. This is similar to the normal .byte + pseudo-op, but it can also take a single ASCII string. */ + +static void +i370_byte (ignore) + int ignore; +{ + if (*input_line_pointer != '\"') + { + cons (1); + return; + } + + /* Gather characters. A real double quote is doubled. Unusual + characters are not permitted. */ + ++input_line_pointer; + while (1) + { + char c; + + c = *input_line_pointer++; + + if (c == '\"') + { + if (*input_line_pointer != '\"') + break; + ++input_line_pointer; + } + + FRAG_APPEND_1_CHAR (c); + } + + demand_empty_rest_of_line (); +} + +/* The .tc pseudo-op. This is used when generating XCOFF and ELF. + This takes two or more arguments. + + When generating XCOFF output, the first argument is the name to + give to this location in the toc; this will be a symbol with class + TC. The rest of the arguments are 4 byte values to actually put at + this location in the TOC; often there is just one more argument, a + relocateable symbol reference. + + When not generating XCOFF output, the arguments are the same, but + the first argument is simply ignored. */ + +static void +i370_tc (ignore) + int ignore; +{ + + /* Skip the TOC symbol name. */ + while (is_part_of_name (*input_line_pointer) + || *input_line_pointer == '[' + || *input_line_pointer == ']' + || *input_line_pointer == '{' + || *input_line_pointer == '}') + ++input_line_pointer; + + /* Align to a four byte boundary. */ + frag_align (2, 0, 0); + record_alignment (now_seg, 2); + + if (*input_line_pointer != ',') + demand_empty_rest_of_line (); + else + { + ++input_line_pointer; + cons (4); + } +} + +/* Turn a string in input_line_pointer into a floating point constant + of type type, and store the appropriate bytes in *litp. The number + of LITTLENUMS emitted is stored in *sizep . An error message is + returned, or NULL on OK. */ + +char * +md_atof (type, litp, sizep) + int type; + char *litp; + int *sizep; +{ + int prec; + LITTLENUM_TYPE words[4]; + char *t; + int i; + + switch (type) + { + case 'f': + case 'E': + type = 'f'; + prec = 2; + break; + + case 'd': + case 'D': + type = 'd'; + prec = 4; + break; + + default: + *sizep = 0; + return "bad call to md_atof"; + } + + /* 360/370/390 have two float formats: an old, funky 360 single-precision + * format, and the ieee format. Support only the ieee format. */ + t = atof_ieee (input_line_pointer, type, words); + if (t) + input_line_pointer = t; + + *sizep = prec * 2; + + for (i = 0; i < prec; i++) + { + md_number_to_chars (litp, (valueT) words[i], 2); + litp += 2; + } + + return NULL; +} + +/* Write a value out to the object file, using the appropriate + endianness. */ + +void +md_number_to_chars (buf, val, n) + char *buf; + valueT val; + int n; +{ + number_to_chars_bigendian (buf, val, n); +} + +/* Align a section (I don't know why this is machine dependent). */ + +valueT +md_section_align (seg, addr) + asection *seg; + valueT addr; +{ + int align = bfd_get_section_alignment (stdoutput, seg); + + return (addr + (1 << align) - 1) & (-1 << align); +} + +/* We don't have any form of relaxing. */ + +int +md_estimate_size_before_relax (fragp, seg) + fragS *fragp; + asection *seg; +{ + abort (); + return 0; +} + +/* Convert a machine dependent frag. We never generate these. */ + +void +md_convert_frag (abfd, sec, fragp) + bfd *abfd; + asection *sec; + fragS *fragp; +{ + abort (); +} + +/* We have no need to default values of symbols. */ + +/*ARGSUSED*/ +symbolS * +md_undefined_symbol (name) + char *name; +{ + return 0; +} + +/* Functions concerning relocs. */ + +/* The location from which a PC relative jump should be calculated, + given a PC relative reloc. */ + +long +md_pcrel_from_section (fixp, sec) + fixS *fixp; + segT sec; +{ + return fixp->fx_frag->fr_address + fixp->fx_where; +} + + +/* Apply a fixup to the object code. This is called for all the + fixups we generated by the call to fix_new_exp, above. In the call + above we used a reloc code which was the largest legal reloc code + plus the operand index. Here we undo that to recover the operand + index. At this point all symbol values should be fully resolved, + and we attempt to completely resolve the reloc. If we can not do + that, we determine the correct reloc code and put it back in the + fixup. + + See gas/cgen.c for more sample code and explanations of what's + going on here ... +*/ + +int +md_apply_fix3 (fixp, valuep, seg) + fixS *fixp; + valueT *valuep; + segT seg; +{ + valueT value; + + value = *valuep; + if (fixp->fx_addsy != NULL) + { + /* Notes: + Branches to labels will come in here with fixp->fx_pcrel set to 1 + and fixp->fx_subsy not null, and holding the value of the base + (i.e. the value of the .using). These we want to ignore. + + 'Strong' and 'weak' symbols will come in here with + fixp->fx_pcrel==0, fixp->fx_addsy defined, and + *valuep holding the value of the symbol. + + 'Strong' symbols will have S_GET_VALUE(fx_addsy) equal to zero, + whereas 'weak' symbols will have S_GET_VALUE(fx_addsy) set to the + symbol value (usually). + + We want to subtract S_GET_VALUE(fx_addsy) if it set, and + for all practical purposes, do a fixup with value zero. This + is because the linker/loader, at a later time, will do this + fixup with the correct value. If we fixup now with a value, + it will get double-fixed, leading to garbage. + + Note that subsy will also be set for strong/weak symbols + when the user program was compiled with -g. In that case, + subsy will hold the base address (i.e. the .using address). + */ + + if (fixp->fx_addsy->sy_used_in_reloc + && S_GET_SEGMENT (fixp->fx_addsy) != absolute_section + && S_GET_SEGMENT (fixp->fx_addsy) != undefined_section + && ! bfd_is_com_section (S_GET_SEGMENT (fixp->fx_addsy))) + value -= S_GET_VALUE (fixp->fx_addsy); + +#ifdef DEBUG + printf ("\nmd_apply_fix3: symbol %s at 0x%x (%s:%d) val=0x%x addend=0x%x\n", + S_GET_NAME (fixp->fx_addsy), + fixp->fx_frag->fr_address + fixp->fx_where, + fixp->fx_file, fixp->fx_line, + S_GET_VALUE (fixp->fx_addsy), value); +#endif + } + else + { + fixp->fx_done = 1; + return 1; + } + + /* Apply fixups to operands. Note that there should be no relocations + for any operands, since no instruction ever takes an operand + that requires reloc. */ + if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED) + { + int opindex; + const struct i370_operand *operand; + char *where; + i370_insn_t insn; + + opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED; + + operand = &i370_operands[opindex]; + +#ifdef DEBUG + printf ("\nmd_apply_fix3: fixup operand %s at 0x%x in %s:%d addend=0x%x\n", + operand->name, + fixp->fx_frag->fr_address + fixp->fx_where, + fixp->fx_file, fixp->fx_line, + value); +#endif + /* Fetch the instruction, insert the fully resolved operand + value, and stuff the instruction back again. + fisxp->fx_size is the length of the instruction. */ + where = fixp->fx_frag->fr_literal + fixp->fx_where; + insn.i[0] = bfd_getb32 ((unsigned char *) where); + if (6 <= fixp->fx_size) + { /* deal with 48-bit insn's */ + insn.i[1] = bfd_getb32 (((unsigned char *) where)+4); + } + insn = i370_insert_operand (insn, operand, (offsetT) value); + bfd_putb32 ((bfd_vma) insn.i[0], (unsigned char *) where); + if (6 <= fixp->fx_size) + { /* deal with 48-bit insn's */ + bfd_putb32 ((bfd_vma) insn.i[1], (((unsigned char *) where)+4)); + } + + /* we are done, right? right !! */ + fixp->fx_done = 1; + if (fixp->fx_done) + { + /* Nothing else to do here. */ + return 1; + } + + /* Determine a BFD reloc value based on the operand information. + We are only prepared to turn a few of the operands into + relocs. In fact, we support *zero* operand relocations ... + Why? Because we are not expecting the compiler to generate + any operands that need relocation. Due to the 12-bit naturew of + i370 addressing, this would be unusual. */ +#if 0 + if ((operand->flags & I370_OPERAND_RELATIVE) != 0 + && operand->bits == 12 + && operand->shift == 0) + fixp->fx_r_type = BFD_RELOC_I370_D12; + else +#endif + { + char *sfile; + unsigned int sline; + + /* Use expr_symbol_where to see if this is an expression + symbol. */ + if (expr_symbol_where (fixp->fx_addsy, &sfile, &sline)) + as_bad_where (fixp->fx_file, fixp->fx_line, + "unresolved expression that must be resolved"); + else + as_bad_where (fixp->fx_file, fixp->fx_line, + "unsupported relocation type"); + fixp->fx_done = 1; + return 1; + } + } + else + { + /* We branch to here if the fixup is not to a symbol that + * appears in an instruction operand, but is rather some + * declared storage. + */ +#ifdef OBJ_ELF + i370_elf_validate_fix (fixp, seg); +#endif +#ifdef DEBUG + printf ("md_apply_fix3: reloc case %d in segment %s %s:%d\n", + fixp->fx_r_type, segment_name (seg), fixp->fx_file, fixp->fx_line); + printf ("\tcurrent fixup value is 0x%x \n", value); +#endif + switch (fixp->fx_r_type) + { + case BFD_RELOC_32: + case BFD_RELOC_CTOR: + if (fixp->fx_pcrel) + fixp->fx_r_type = BFD_RELOC_32_PCREL; + /* fall through */ + + case BFD_RELOC_RVA: + case BFD_RELOC_32_PCREL: + case BFD_RELOC_32_BASEREL: +#ifdef DEBUG + printf ("\t32 bit relocation at 0x%x\n", + fixp->fx_frag->fr_address + fixp->fx_where); +#endif + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + value, 4); + break; + + case BFD_RELOC_LO16: + case BFD_RELOC_16: + if (fixp->fx_pcrel) + as_bad_where (fixp->fx_file, fixp->fx_line, + "cannot emit PC relative %s relocation%s%s", + bfd_get_reloc_code_name (fixp->fx_r_type), + fixp->fx_addsy != NULL ? " against " : "", + (fixp->fx_addsy != NULL + ? S_GET_NAME (fixp->fx_addsy) + : "")); + + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + value, 2); + break; + + /* This case happens when you write, for example, + lis %r3,(L1-L2)@ha + where L1 and L2 are defined later. */ + case BFD_RELOC_HI16: + if (fixp->fx_pcrel) + abort (); + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + value >> 16, 2); + break; + case BFD_RELOC_HI16_S: + if (fixp->fx_pcrel) + abort (); + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + (value + 0x8000) >> 16, 2); + break; + + case BFD_RELOC_8: + if (fixp->fx_pcrel) + abort (); + + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + value, 1); + break; + + default: + fprintf(stderr, + "Gas failure, reloc value %d\n", fixp->fx_r_type); + fflush(stderr); + abort (); + } + } + + fixp->fx_addnumber = value; + + return 1; +} + +/* Generate a reloc for a fixup. */ + +arelent * +tc_gen_reloc (seg, fixp) + asection *seg; + fixS *fixp; +{ + arelent *reloc; + + reloc = (arelent *) xmalloc (sizeof (arelent)); + + reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); + *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); + reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; + reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); + if (reloc->howto == (reloc_howto_type *) NULL) + { + as_bad_where (fixp->fx_file, fixp->fx_line, + "reloc %d not supported by object file format", (int)fixp->fx_r_type); + return NULL; + } + reloc->addend = fixp->fx_addnumber; + +#ifdef DEBUG + printf ("\ngen_reloc(): sym %s (%s:%d) at addr 0x%x addend=0x%x\n", + fixp->fx_addsy->bsym->name, + fixp->fx_file, fixp->fx_line, + reloc->address, reloc->addend); +#endif + + return reloc; +} diff --git a/gas/config/tc-i370.h b/gas/config/tc-i370.h new file mode 100644 index 0000000..8f32fa8 --- /dev/null +++ b/gas/config/tc-i370.h @@ -0,0 +1,104 @@ +/* tc-i370.h -- Header file for tc-i370.c. + Copyright (C) 1994, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. + Written by Ian Lance Taylor, Cygnus Support. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#define TC_I370 + +#ifdef ANSI_PROTOTYPES +struct fix; +#endif + +/* Set the endianness we are using. Default to big endian. */ +#ifndef TARGET_BYTES_BIG_ENDIAN +#define TARGET_BYTES_BIG_ENDIAN 1 +#endif + +#ifndef BFD_ASSEMBLER + #error I370 support requires BFD_ASSEMBLER +#endif + +/* The target BFD architecture. */ +#define TARGET_ARCH (i370_arch ()) +extern enum bfd_architecture i370_arch PARAMS ((void)); + +/* Whether or not the target is big endian */ +extern int target_big_endian; + +/* The target BFD format. */ +#ifdef OBJ_ELF +#define TARGET_FORMAT ("elf32-i370") +#endif + +/* Permit temporary numeric labels. */ +#define LOCAL_LABELS_FB 1 + +/* $ is used to refer to the current location. */ +/* #define DOLLAR_DOT */ + +#ifdef OBJ_ELF +#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */ +#endif + +/* We don't need to handle .word strangely. */ +#define WORKING_DOT_WORD + +/* We set the fx_done field appropriately in md_apply_fix. */ +#define TC_HANDLES_FX_DONE + + +#ifdef OBJ_ELF + +/* Branch prediction relocations must force relocation. */ +#define TC_FORCE_RELOCATION_SECTION(FIXP,SEC) 1 + +/* Support for SHF_EXCLUDE and SHT_ORDERED */ +extern int i370_section_letter PARAMS ((int, char **)); +extern int i370_section_type PARAMS ((char *, size_t)); +extern int i370_section_word PARAMS ((char *, size_t)); +extern int i370_section_flags PARAMS ((int, int, int)); + +#define md_elf_section_letter(LETTER, PTR_MSG) i370_section_letter (LETTER, PTR_MSG) +#define md_elf_section_type(STR, LEN) i370_section_type (STR, LEN) +#define md_elf_section_word(STR, LEN) i370_section_word (STR, LEN) +#define md_elf_section_flags(FLAGS, ATTR, TYPE) i370_section_flags (FLAGS, ATTR, TYPE) + +#define tc_comment_chars i370_comment_chars +extern const char *i370_comment_chars; + +/* We must never ever try to resolve references to externally visible + symbols in the assembler, because the .o file might go into a shared + library, and some other shared library might override that symbol. */ +#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \ + ((FIX)->fx_addsy == NULL \ + || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \ + && ! S_IS_WEAK ((FIX)->fx_addsy) \ + && S_IS_DEFINED ((FIX)->fx_addsy) \ + && ! S_IS_COMMON ((FIX)->fx_addsy))) + +#endif /* OBJ_ELF */ + +/* call md_apply_fix3 with segment instead of md_apply_fix */ +#define MD_APPLY_FIX3 + +/* call md_pcrel_from_section, not md_pcrel_from */ +#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) +extern long md_pcrel_from_section PARAMS ((struct fix *, segT)); + +#define md_operand(x) diff --git a/gas/configure b/gas/configure index 1b5d52a..6bcc0d3 100755 --- a/gas/configure +++ b/gas/configure @@ -2110,6 +2110,7 @@ for this_target in $target $canon_targets ; do h8300-*-coff) fmt=coff ;; + i370-*-elf* | i370-*-linux*) fmt=elf ;; i386-ibm-aix*) fmt=coff em=i386aix ;; i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;; @@ -2753,7 +2754,7 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2757: checking for $ac_word" >&5 +echo "configure:2758: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2783,7 +2784,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2787: checking for $ac_word" >&5 +echo "configure:2788: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2834,7 +2835,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2838: checking for $ac_word" >&5 +echo "configure:2839: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2866,7 +2867,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2870: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 +echo "configure:2871: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2877,12 +2878,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2881 "configure" +#line 2882 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2908,12 +2909,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2912: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2913: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2917: checking whether we are using GNU C" >&5 +echo "configure:2918: checking whether we are using GNU C" >&5 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2922,7 +2923,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2941,7 +2942,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2945: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2946: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2978,7 +2979,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2982: checking for $ac_word" >&5 +echo "configure:2983: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_YACC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3009,7 +3010,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3013: checking how to run the C preprocessor" >&5 +echo "configure:3014: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3024,13 +3025,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 3028 "configure" +#line 3029 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3041,13 +3042,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 3045 "configure" +#line 3046 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3058,13 +3059,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 3062 "configure" +#line 3063 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3094,7 +3095,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3098: checking for $ac_word" >&5 +echo "configure:3099: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_LEX+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3127,7 +3128,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex"" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3131: checking for $ac_word" >&5 +echo "configure:3132: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_LEX+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3161,7 +3162,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:3165: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3166: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3169,7 +3170,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 3173 "configure" +#line 3174 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3180,7 +3181,7 @@ int main() { yywrap() ; return 0; } EOF -if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3203,7 +3204,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:3207: checking lex output file root" >&5 +echo "configure:3208: checking lex output file root" >&5 if eval "test \"\${ac_cv_prog_lex_root+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3224,7 +3225,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:3228: checking whether yytext is a pointer" >&5 +echo "configure:3229: checking whether yytext is a pointer" >&5 if eval "test \"\${ac_cv_prog_lex_yytext_pointer+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3236,14 +3237,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <<EOF -#line 3240 "configure" +#line 3241 "configure" #include "confdefs.h" `cat $LEX_OUTPUT_ROOT.c` int main() { ; return 0; } EOF -if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -3267,7 +3268,7 @@ fi ALL_LINGUAS= echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:3271: checking for POSIXized ISC" >&5 +echo "configure:3272: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -3288,12 +3289,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3292: checking for ANSI C header files" >&5 +echo "configure:3293: checking for ANSI C header files" >&5 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3297 "configure" +#line 3298 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -3301,7 +3302,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3318,7 +3319,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 3322 "configure" +#line 3323 "configure" #include "confdefs.h" #include <string.h> EOF @@ -3336,7 +3337,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 3340 "configure" +#line 3341 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -3357,7 +3358,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 3361 "configure" +#line 3362 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3368,7 +3369,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3392,12 +3393,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3396: checking for working const" >&5 +echo "configure:3397: checking for working const" >&5 if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3401 "configure" +#line 3402 "configure" #include "confdefs.h" int main() { @@ -3446,7 +3447,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:3450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3467,21 +3468,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3471: checking for inline" >&5 +echo "configure:3472: checking for inline" >&5 if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 3478 "configure" +#line 3479 "configure" #include "confdefs.h" int main() { } $ac_kw int foo() { ; return 0; } EOF -if { (eval echo configure:3485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3507,12 +3508,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3511: checking for off_t" >&5 +echo "configure:3512: checking for off_t" >&5 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3516 "configure" +#line 3517 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3542,12 +3543,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3546: checking for size_t" >&5 +echo "configure:3547: checking for size_t" >&5 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3551 "configure" +#line 3552 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3579,19 +3580,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3583: checking for working alloca.h" >&5 +echo "configure:3584: checking for working alloca.h" >&5 if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3588 "configure" +#line 3589 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3612,12 +3613,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3616: checking for alloca" >&5 +echo "configure:3617: checking for alloca" >&5 if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3621 "configure" +#line 3622 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -3645,7 +3646,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3677,12 +3678,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3681: checking whether alloca needs Cray hooks" >&5 +echo "configure:3682: checking whether alloca needs Cray hooks" >&5 if eval "test \"\${ac_cv_os_cray+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3686 "configure" +#line 3687 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -3707,12 +3708,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3711: checking for $ac_func" >&5 +echo "configure:3712: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3716 "configure" +#line 3717 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3736,7 +3737,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3763,7 +3764,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3767: checking stack direction for C alloca" >&5 +echo "configure:3768: checking stack direction for C alloca" >&5 if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3771,7 +3772,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 3775 "configure" +#line 3776 "configure" #include "confdefs.h" find_stack_direction () { @@ -3790,7 +3791,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3815,17 +3816,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3819: checking for $ac_hdr" >&5 +echo "configure:3820: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3824 "configure" +#line 3825 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3854,12 +3855,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3858: checking for $ac_func" >&5 +echo "configure:3859: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3863 "configure" +#line 3864 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3883,7 +3884,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:3887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3908,7 +3909,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3912: checking for working mmap" >&5 +echo "configure:3913: checking for working mmap" >&5 if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3916,7 +3917,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3920 "configure" +#line 3921 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -4056,7 +4057,7 @@ main() } EOF -if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -4084,17 +4085,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4088: checking for $ac_hdr" >&5 +echo "configure:4089: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4093 "configure" +#line 4094 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4124,12 +4125,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4128: checking for $ac_func" >&5 +echo "configure:4129: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4133 "configure" +#line 4134 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4153,7 +4154,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4182,12 +4183,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4186: checking for $ac_func" >&5 +echo "configure:4187: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4191 "configure" +#line 4192 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4211,7 +4212,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4245,19 +4246,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:4249: checking for LC_MESSAGES" >&5 +echo "configure:4250: checking for LC_MESSAGES" >&5 if eval "test \"\${am_cv_val_LC_MESSAGES+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4254 "configure" +#line 4255 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -4278,7 +4279,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:4282: checking whether NLS is requested" >&5 +echo "configure:4283: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -4298,7 +4299,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:4302: checking whether included gettext is requested" >&5 +echo "configure:4303: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -4317,17 +4318,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:4321: checking for libintl.h" >&5 +echo "configure:4322: checking for libintl.h" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4326 "configure" +#line 4327 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4344,19 +4345,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:4348: checking for gettext in libc" >&5 +echo "configure:4349: checking for gettext in libc" >&5 if eval "test \"\${gt_cv_func_gettext_libc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4353 "configure" +#line 4354 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -4372,7 +4373,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:4376: checking for bindtextdomain in -lintl" >&5 +echo "configure:4377: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-:%__p__%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4380,7 +4381,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4384 "configure" +#line 4385 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4391,7 +4392,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4407,19 +4408,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:4411: checking for gettext in libintl" >&5 +echo "configure:4412: checking for gettext in libintl" >&5 if eval "test \"\${gt_cv_func_gettext_libintl+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4416 "configure" +#line 4417 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -4447,7 +4448,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4451: checking for $ac_word" >&5 +echo "configure:4452: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4481,12 +4482,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4485: checking for $ac_func" >&5 +echo "configure:4486: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4490 "configure" +#line 4491 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4510,7 +4511,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4537,7 +4538,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4541: checking for $ac_word" >&5 +echo "configure:4542: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4573,7 +4574,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4577: checking for $ac_word" >&5 +echo "configure:4578: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4605,7 +4606,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 4609 "configure" +#line 4610 "configure" #include "confdefs.h" int main() { @@ -4613,7 +4614,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4645,7 +4646,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4649: checking for $ac_word" >&5 +echo "configure:4650: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4679,7 +4680,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4683: checking for $ac_word" >&5 +echo "configure:4684: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4715,7 +4716,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4719: checking for $ac_word" >&5 +echo "configure:4720: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4805,7 +4806,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4809: checking for catalogs to be installed" >&5 +echo "configure:4810: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4833,17 +4834,17 @@ echo "configure:4809: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4837: checking for linux/version.h" >&5 +echo "configure:4838: checking for linux/version.h" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4842 "configure" +#line 4843 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4906,7 +4907,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4910: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4911: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4929,12 +4930,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:4933: checking for Cygwin environment" >&5 +echo "configure:4934: checking for Cygwin environment" >&5 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4938 "configure" +#line 4939 "configure" #include "confdefs.h" int main() { @@ -4945,7 +4946,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:4949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -4961,19 +4962,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:4965: checking for mingw32 environment" >&5 +echo "configure:4966: checking for mingw32 environment" >&5 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4970 "configure" +#line 4971 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:4977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -4989,19 +4990,19 @@ echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6 -echo "configure:4993: checking for EMX OS/2 environment" >&5 +echo "configure:4994: checking for EMX OS/2 environment" >&5 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4998 "configure" +#line 4999 "configure" #include "confdefs.h" int main() { return __EMX__; ; return 0; } EOF -if { (eval echo configure:5005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_emxos2=yes else @@ -5020,7 +5021,7 @@ test "$ac_cv_emxos2" = yes && EMXOS2=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:5024: checking for executable suffix" >&5 +echo "configure:5025: checking for executable suffix" >&5 if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5030,7 +5031,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:5034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.C | *.o | *.obj | *.xcoff) ;; @@ -5055,17 +5056,17 @@ for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h e do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5059: checking for $ac_hdr" >&5 +echo "configure:5060: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5064 "configure" +#line 5065 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5095,7 +5096,7 @@ done # Put this here so that autoconf's "cross-compiling" message doesn't confuse # people who are not cross-compiling but are compiling cross-assemblers. echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 -echo "configure:5099: checking whether compiling a cross-assembler" >&5 +echo "configure:5100: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -5110,19 +5111,19 @@ echo "$ac_t""$cross_gas" 1>&6 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:5114: checking for working alloca.h" >&5 +echo "configure:5115: checking for working alloca.h" >&5 if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5119 "configure" +#line 5120 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -5143,12 +5144,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:5147: checking for alloca" >&5 +echo "configure:5148: checking for alloca" >&5 if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5152 "configure" +#line 5153 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -5176,7 +5177,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -5208,12 +5209,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5212: checking whether alloca needs Cray hooks" >&5 +echo "configure:5213: checking whether alloca needs Cray hooks" >&5 if eval "test \"\${ac_cv_os_cray+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5217 "configure" +#line 5218 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -5238,12 +5239,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5242: checking for $ac_func" >&5 +echo "configure:5243: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5247 "configure" +#line 5248 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5267,7 +5268,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5294,7 +5295,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5298: checking stack direction for C alloca" >&5 +echo "configure:5299: checking stack direction for C alloca" >&5 if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5302,7 +5303,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 5306 "configure" +#line 5307 "configure" #include "confdefs.h" find_stack_direction () { @@ -5321,7 +5322,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:5325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -5343,21 +5344,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:5347: checking for inline" >&5 +echo "configure:5348: checking for inline" >&5 if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 5354 "configure" +#line 5355 "configure" #include "confdefs.h" int main() { } $ac_kw int foo() { ; return 0; } EOF -if { (eval echo configure:5361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -5387,12 +5388,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5391: checking for $ac_func" >&5 +echo "configure:5392: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5396 "configure" +#line 5397 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5416,7 +5417,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5445,12 +5446,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5449: checking for $ac_func" >&5 +echo "configure:5450: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5454 "configure" +#line 5455 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5474,7 +5475,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5503,12 +5504,12 @@ done # enough, but on some of those systems, the assert macro relies on requoting # working properly! echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 -echo "configure:5507: checking for working assert macro" >&5 +echo "configure:5508: checking for working assert macro" >&5 if eval "test \"\${gas_cv_assert_ok+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5512 "configure" +#line 5513 "configure" #include "confdefs.h" #include <assert.h> #include <stdio.h> @@ -5524,7 +5525,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -5565,12 +5566,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:5569: checking whether declaration is required for strstr" >&5 +echo "configure:5570: checking whether declaration is required for strstr" >&5 if eval "test \"\${gas_cv_decl_needed_strstr+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5574 "configure" +#line 5575 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5581,7 +5582,7 @@ x = (f) strstr; ; return 0; } EOF -if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_strstr=no else @@ -5602,12 +5603,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:5606: checking whether declaration is required for malloc" >&5 +echo "configure:5607: checking whether declaration is required for malloc" >&5 if eval "test \"\${gas_cv_decl_needed_malloc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5611 "configure" +#line 5612 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5618,7 +5619,7 @@ x = (f) malloc; ; return 0; } EOF -if { (eval echo configure:5622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_malloc=no else @@ -5639,12 +5640,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:5643: checking whether declaration is required for free" >&5 +echo "configure:5644: checking whether declaration is required for free" >&5 if eval "test \"\${gas_cv_decl_needed_free+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5648 "configure" +#line 5649 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5655,7 +5656,7 @@ x = (f) free; ; return 0; } EOF -if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_free=no else @@ -5676,12 +5677,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:5680: checking whether declaration is required for sbrk" >&5 +echo "configure:5681: checking whether declaration is required for sbrk" >&5 if eval "test \"\${gas_cv_decl_needed_sbrk+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5685 "configure" +#line 5686 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5692,7 +5693,7 @@ x = (f) sbrk; ; return 0; } EOF -if { (eval echo configure:5696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_sbrk=no else @@ -5713,12 +5714,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:5717: checking whether declaration is required for environ" >&5 +echo "configure:5718: checking whether declaration is required for environ" >&5 if eval "test \"\${gas_cv_decl_needed_environ+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5722 "configure" +#line 5723 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -5729,7 +5730,7 @@ x = (f) environ; ; return 0; } EOF -if { (eval echo configure:5733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_environ=no else @@ -5753,12 +5754,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:5757: checking whether declaration is required for errno" >&5 +echo "configure:5758: checking whether declaration is required for errno" >&5 if eval "test \"\${gas_cv_decl_needed_errno+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5762 "configure" +#line 5763 "configure" #include "confdefs.h" #ifdef HAVE_ERRNO_H @@ -5773,7 +5774,7 @@ x = (f) errno; ; return 0; } EOF -if { (eval echo configure:5777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_errno=no else diff --git a/gas/configure.in b/gas/configure.in index ed12ca2..b6d6d0b 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -176,6 +176,7 @@ changequote([,])dnl h8300-*-coff) fmt=coff ;; + i370-*-elf* | i370-*-linux*) fmt=elf ;; i386-ibm-aix*) fmt=coff em=i386aix ;; i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;; diff --git a/gas/doc/Makefile.am b/gas/doc/Makefile.am index 158ec13..a7d55a3 100644 --- a/gas/doc/Makefile.am +++ b/gas/doc/Makefile.am @@ -22,6 +22,7 @@ CPU_DOCS = \ c-h8300.texi \ c-h8500.texi \ c-hppa.texi \ + c-i370.texi \ c-i386.texi \ c-i960.texi \ c-m68k.texi \ diff --git a/gas/doc/Makefile.in b/gas/doc/Makefile.in index 803c820..e9868c7 100644 --- a/gas/doc/Makefile.in +++ b/gas/doc/Makefile.in @@ -126,6 +126,7 @@ CPU_DOCS = \ c-h8300.texi \ c-h8500.texi \ c-hppa.texi \ + c-i370.texi \ c-i386.texi \ c-i960.texi \ c-m68k.texi \ diff --git a/gas/doc/all.texi b/gas/doc/all.texi index 416b2dc..d1058fb 100644 --- a/gas/doc/all.texi +++ b/gas/doc/all.texi @@ -1,4 +1,4 @@ -@c Copyright 1992, 1993 Free Software Foundation, Inc. +@c Copyright 1992, 1993, 2000 Free Software Foundation, Inc. @c This file is part of the documentation for the GAS manual @c Configuration settings for all-inclusive version of manual @@ -33,6 +33,7 @@ @set H8/300 @set H8/500 @set HPPA +@set I370 @set I80386 @set I960 @set M32R diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index 9e89cee..5917a00 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -1,5 +1,5 @@ \input texinfo @c -*-Texinfo-*- -@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 +@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000 @c Free Software Foundation, Inc. @c UPDATE!! On future updates-- @c (1) check for new machine-dep cmdline options in @@ -4927,6 +4927,9 @@ subject, see the hardware manufacturer's manual. @ifset HPPA * HPPA-Dependent:: HPPA Dependent Features @end ifset +@ifset I370 +* ESA/390-Dependent:: IBM ESA/390 Dependent Features +@end ifset @ifset I80386 * i386-Dependent:: Intel 80386 Dependent Features @end ifset @@ -5094,6 +5097,10 @@ family. @include c-hppa.texi @end ifset +@ifset I370 +@include c-i370.texi +@end ifset + @ifset I80386 @include c-i386.texi @end ifset @@ -5425,6 +5432,8 @@ Jeff Law at the University of Utah (HPPA mainly), Michael Meissner of the Open Software Foundation (i386 mainly), and Ken Raeburn of Cygnus Support (sparc, and some initial 64-bit support). +Linas Vepstas added GAS support for the ESA/390 "IBM 370" architecture. + Richard Henderson rewrote the Alpha assembler. Klaus Kaempf wrote GAS and BFD support for openVMS/Alpha. diff --git a/gas/doc/c-i370.texi b/gas/doc/c-i370.texi new file mode 100644 index 0000000..18b41b2 --- /dev/null +++ b/gas/doc/c-i370.texi @@ -0,0 +1,200 @@ +@c Copyright (C) 2000 Free Software Foundation, Inc. +@c This is part of the GAS manual. +@c For copying conditions, see the file as.texinfo. +@ifset GENERIC +@page +@node ESA/390-Dependent +@chapter ESA/390 Dependent Features +@end ifset +@ifclear GENERIC +@node Machine Dependencies +@chapter ESA/390 Dependent Features +@end ifclear + +@cindex i370 support +@cindex ESA/390 support + +@menu +* ESA/390 Notes:: Notes +* ESA/390 Options:: Options +* ESA/390 Syntax:: Syntax +* ESA/390 Floating Point:: Floating Point +* ESA/390 Directives:: ESA/390 Machine Directives +* ESA/390 Opcodes:: Opcodes +@end menu + +@node ESA/390 Notes +@section Notes +The ESA/390 @code{@value{AS}} port is currently intended to be a back-end +for the @sc{gnu} @sc{cc} compiler. It is not HLASM compatible, although +it does support a subset of some of the HLASM directives. The only +supported binary file format is ELF; none of the usual MVS/VM/OE/USS +object file formats, such as ESD or XSD, are supported. + +When used with the @sc{gnu} @sc{cc} compiler, the ESA/390 @code{@value{AS}} +will produce correct, fully relocated, functional binaries, and has been +used to compile and execute large projects. However, many aspects should +still be considered experimental; these include shared library support, +dynamically loadable objects, and any relocation other than the 31-bit +relocation. + +@node ESA/390 Options +@section Options +@code{@value{AS}} has no machine-dependent command-line options for the ESA/390. + +@cindex ESA/390 Syntax +@node ESA/390 Syntax +@section Syntax +The opcode/operand syntax follows the ESA/390 Principles of Operation +manual; assembler directives and general syntax are loosely based on the +prevailing AT&T/SVR4/ELF/Solaris style notation. HLASM-style directives +are @emph{not} supported for the most part, with the exception of those +described herein. + +A leading dot in front of directives is optional, and the case of +directives is ignored; thus for example, .using and USING have the same +effect. + +A colon may immediately follow a label definition. This is +simply for compatibility with how most assembly language programmers +write code. + +@samp{#} is the line comment character. + +@samp{;} can be used instead of a newline to separate statements. + +Since @samp{$} has no special meaning, you may use it in symbol names. + +Registers can be given the symbolic names r0..r15, fp0, fp2, fp4, fp6. +By using thesse symbolic names, @code{@value{AS}} can detect simple +syntax errors. The name rarg or r.arg is a synonym for r11, rtca or r.tca +for r12, sp, r.sp, dsa r.dsa for r13, lr or r.lr for r14, rbase or r.base +for r3 and rpgt or r.pgt for r4. + +@samp{*} is the current location counter. Unlike @samp{.} it is always +relative to the last USING directive. Note that this means that +expressions cannot use multiplication, as any occurence of @samp{*} +will be interpreted as a location counter. + +All labels are relative to the last USING. Thus, branches to a label +always imply the use of base+displacement. + +Many of the usual forms of address constants / address literals +are supported. Thus, +@example + .using *,r3 + L r15,=A(some_routine) + LM r6,r7,=V(some_longlong_extern) + A r1,=F'12' + AH r0,=H'42' + ME r6,=E'3.1416' + MD r6,=D'3.14159265358979' + O r6,=XL4'cacad0d0' + .ltorg +@end example +should all behave as expected: that is, an entry in the literal +pool will be created (or reused if it already exists), and the +instruction operands will be the displacement into the literal pool +using the current base register (as last declared with the @code{.using} +directive). + +@node ESA/390 Floating Point +@section Floating Point +@cindex floating point, ESA/390 (@sc{ieee}) +@cindex ESA/390 floating point (@sc{ieee}) +The assembler generates only @sc{ieee} floating-point numbers. The older +floiating point formats are not supported. + + +@node ESA/390 Directives +@section ESA/390 Assembler Directives + +@code{@value{AS}} for the ESA/390 supports all of the standard ELF/SVR4 +assembler directives that are documented in the main part of this +documentation. Several additional directives are supported in order +to implement the ESA/390 addressing model. The most important of these +are @code{.using} and @code{.ltorg} + +@cindex ESA/390-only directives +These are the additional directives in @code{@value{AS}} for the ESA/390: + +@table @code +@item .dc +A small subset of the usual DC directive is supported. + +@item .drop @var{regno} +Stop using @var{regno} as the base register. The @var{regno} must +have been previously declared with a @code{.using} directive in the +same section as the current section. + +@item .ebcdic @var{string} +Emit the EBCDIC equivalent of the indicated string. The emitted string +will be null terminated. Note that the directives @code{.string} etc. emit +ascii strings by default. + +@item EQU +The standard HLASM-style EQU directive is not supported; however, the +standard @code{@value{AS}} directive .equ can be used to the same effect. + +@item .ltorg +Dump the literal pool accumulated so far; begin a new literal pool. +The literal pool will be written in the current section; in order to +generate correct assembly, a @code{.using} must have been previously +specified in the same section. + +@item .using @var{expr},@var{regno} +Use @var{regno} as the base register for all subsequent RX, RS, and SS form +instructions. The @var{expr} will be evaluated to obtain the base address; +usually, @var{expr} will merely be @samp{*}. + +This assembler allows two @code{.using} directives to be simultaneously +outstanding, one in the @code{.text} section, and one in another section +(typically, the @code{.data} section). This feature allows +dynamically loaded objects to be implemented in a relatively +straightforward way. A @code{.using} directive must always be specified +in the @code{.text} section; this will specify the base register that +will be used for branches in the @code{.text} section. A second +@code{.using} may be specified in another section; this will specify +the base register that is used for non-label address literals. +When a second @code{.using} is specified, then the subsequent +@code{.ltorg} must be put in the same section; otherwise an error will +result. + +Thus, for example, the following code uses @code{r3} to address branch +targets and @code{r4} to address the literal pool, which has been written +to the @code{.data} section. The is, the constants @code{=A(some_routine)}, +@code{=H'42'} and @code{=E'3.1416'} will all appear in the @code{.data} +section. + +@example +.data + .using LITPOOL,r4 +.text + BASR r3,0 + .using *,r3 + B START + .long LITPOOL +START: + L r4,4(,r3) + L r15,=A(some_routine) + LTR r15,r15 + BNE LABEL + AH r0,=H'42' +LABEL: + ME r6,=E'3.1416' +.data +LITPOOL: + .ltorg +@end example + + +Note that this dual-@code{.using} directive semantics extends +and is not compatible with HLASM semantics. Note that this assembler +directive does not support the full range of HLASM semantics. + +@end table + +@node ESA/390 Opcodes +@section Opcodes +For detailed information on the ESA/390 machine instruction set, see +@cite{ESA/390 Principles of Operation} (IBM Publication Number DZ9AR004). diff --git a/include/ChangeLog b/include/ChangeLog index c78135e..b34f2fd 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,7 +1,11 @@ +2000-02-23 Linas Vepstas <linas@linas.org> + + * dis-asm.h (print_insn_i370): Declare. + 2000-02-22 Chandra Chavva <cchavva@cygnus.com> - * opcode/d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation cannot - be combined in parallel with ADD/SUBppp. + * opcode/d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation + cannot be combined in parallel with ADD/SUBppp. Tue Feb 22 15:19:54 2000 Andrew Cagney <cagney@b1.cygnus.com> diff --git a/include/dis-asm.h b/include/dis-asm.h index 1f835d3..874c3b6 100644 --- a/include/dis-asm.h +++ b/include/dis-asm.h @@ -157,6 +157,7 @@ extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_i386_att PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_i386_intel PARAMS ((bfd_vma, disassemble_info*)); +extern int print_insn_i370 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*)); diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 54df0cf..129ad30 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,7 @@ +2000-02-23 Linas Vepstas <linas@linas.org> + + * i370.h: New file. + 2000-02-22 Nick Clifton <nickc@cygnus.com> * common.h (ELF_ST_OTHER): Remove definition. diff --git a/include/elf/i370.h b/include/elf/i370.h new file mode 100644 index 0000000..9c021f0 --- /dev/null +++ b/include/elf/i370.h @@ -0,0 +1,46 @@ +/* i370 ELF support for BFD. + Copyright (C) 1995, 2000 Free Software Foundation, Inc. + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* This file holds definitions specific to the i370 ELF ABI. Note + that most of this is not actually implemented by BFD. */ + +#ifndef _ELF_I370_H +#define _ELF_I370_H + +/* Processor specific section headers, sh_type field */ + +#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \ + entries in this section \ + based on the address \ + specified in the associated \ + symbol table entry. */ + +#define EF_I370_RELOCATABLE 0x00010000 /* i370 -mrelocatable flag */ +#define EF_I370_RELOCATABLE_LIB 0x00008000 /* i370 -mrelocatable-lib flag */ +/* Processor specific section flags, sh_flags field */ + +#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \ + this section from executable \ + and shared objects that it \ + builds when those objects \ + are not to be furhter \ + relocated. */ +#endif /* _ELF_I370_H */ + + diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index b5befb8..3ce923a 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,3 +1,7 @@ +2000-02-23 Linas Vepstas <linas@linas.org> + + * i370.h: New file. + 2000-02-22 Andrew Haley <aph@cygnus.com> * mips.h: (OPCODE_IS_MEMBER): Add comment. diff --git a/include/opcode/i370.h b/include/opcode/i370.h new file mode 100644 index 0000000..f2049e7 --- /dev/null +++ b/include/opcode/i370.h @@ -0,0 +1,265 @@ +/* i370.h -- Header file for S/390 opcode table + Copyright 1994, 95, 98, 99, 2000 Free Software Foundation, Inc. + PowerPC version written by Ian Lance Taylor, Cygnus Support + Rewritten for i370 ESA/390 support, Linas Vepstas <linas@linas.org> + +This file is part of GDB, GAS, and the GNU binutils. + +GDB, GAS, and the GNU binutils are free software; you can redistribute +them and/or modify them under the terms of the GNU General Public +License as published by the Free Software Foundation; either version +1, or (at your option) any later version. + +GDB, GAS, and the GNU binutils are distributed in the hope that they +will be useful, but WITHOUT ANY WARRANTY; without even the implied +warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this file; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef I370_H +#define I370_H + +/* The opcode table is an array of struct i370_opcode. */ +typedef union +{ + unsigned int i[2]; + unsigned short s[4]; + unsigned char b[8]; +} i370_insn_t; + +struct i370_opcode +{ + /* The opcode name. */ + const char *name; + + /* the length of the instruction */ + char len; + + /* The opcode itself. Those bits which will be filled in with + operands are zeroes. */ + i370_insn_t opcode; + + /* The opcode mask. This is used by the disassembler. This is a + mask containing ones indicating those bits which must match the + opcode field, and zeroes indicating those bits which need not + match (and are presumably filled in by operands). */ + i370_insn_t mask; + + /* One bit flags for the opcode. These are used to indicate which + specific processors support the instructions. The defined values + are listed below. */ + unsigned long flags; + + /* An array of operand codes. Each code is an index into the + operand table. They appear in the order which the operands must + appear in assembly code, and are terminated by a zero. */ + unsigned char operands[8]; +}; + +/* The table itself is sorted by major opcode number, and is otherwise + in the order in which the disassembler should consider + instructions. */ +extern const struct i370_opcode i370_opcodes[]; +extern const int i370_num_opcodes; + +/* Values defined for the flags field of a struct i370_opcode. */ + +/* Opcode is defined for the original 360 architecture. */ +#define I370_OPCODE_360 (0x01) + +/* Opcode is defined for the 370 architecture. */ +#define I370_OPCODE_370 (0x02) + +/* Opcode is defined for the 370-XA architecture. */ +#define I370_OPCODE_370_XA (0x04) + +/* Opcode is defined for the ESA/370 architecture. */ +#define I370_OPCODE_ESA370 (0x08) + +/* Opcode is defined for the ESA/390 architecture. */ +#define I370_OPCODE_ESA390 (0x10) + +/* Opcode is defined for the ESA/390 w/ BFP facility. */ +#define I370_OPCODE_ESA390_BF (0x20) + +/* Opcode is defined for the ESA/390 w/ branch & set authority facility. */ +#define I370_OPCODE_ESA390_BS (0x40) + +/* Opcode is defined for the ESA/390 w/ checksum facility. */ +#define I370_OPCODE_ESA390_CK (0x80) + +/* Opcode is defined for the ESA/390 w/ compare & move extended facility. */ +#define I370_OPCODE_ESA390_CM (0x100) + +/* Opcode is defined for the ESA/390 w/ flt.pt. support extensions facility. */ +#define I370_OPCODE_ESA390_FX (0x200) + +/* Opcode is defined for the ESA/390 w/ HFP facility. */ +#define I370_OPCODE_ESA390_HX (0x400) + +/* Opcode is defined for the ESA/390 w/ immediate & relative facility. */ +#define I370_OPCODE_ESA390_IR (0x800) + +/* Opcode is defined for the ESA/390 w/ move-inverse facility. */ +#define I370_OPCODE_ESA390_MI (0x1000) + +/* Opcode is defined for the ESA/390 w/ program-call-fast facility. */ +#define I370_OPCODE_ESA390_PC (0x2000) + +/* Opcode is defined for the ESA/390 w/ perform-locked-op facility. */ +#define I370_OPCODE_ESA390_PL (0x4000) + +/* Opcode is defined for the ESA/390 w/ square-root facility. */ +#define I370_OPCODE_ESA390_QR (0x8000) + +/* Opcode is defined for the ESA/390 w/ resume-program facility. */ +#define I370_OPCODE_ESA390_RP (0x10000) + +/* Opcode is defined for the ESA/390 w/ set-address-space-fast facility. */ +#define I370_OPCODE_ESA390_SA (0x20000) + +/* Opcode is defined for the ESA/390 w/ subspace group facility. */ +#define I370_OPCODE_ESA390_SG (0x40000) + +/* Opcode is defined for the ESA/390 w/ string facility. */ +#define I370_OPCODE_ESA390_SR (0x80000) + +/* Opcode is defined for the ESA/390 w/ trap facility. */ +#define I370_OPCODE_ESA390_TR (0x100000) + +#define I370_OPCODE_ESA390_SUPERSET (0x1fffff) + + +/* The operands table is an array of struct i370_operand. */ + +struct i370_operand +{ + /* The number of bits in the operand. */ + int bits; + + /* How far the operand is left shifted in the instruction. */ + int shift; + + /* Insertion function. This is used by the assembler. To insert an + operand value into an instruction, check this field. + + If it is NULL, execute + i |= (op & ((1 << o->bits) - 1)) << o->shift; + (i is the instruction which we are filling in, o is a pointer to + this structure, and op is the opcode value; this assumes twos + complement arithmetic). + + If this field is not NULL, then simply call it with the + instruction and the operand value. It will return the new value + of the instruction. If the ERRMSG argument is not NULL, then if + the operand value is illegal, *ERRMSG will be set to a warning + string (the operand will be inserted in any case). If the + operand value is legal, *ERRMSG will be unchanged (most operands + can accept any value). */ + i370_insn_t (*insert) PARAMS ((i370_insn_t instruction, long op, + const char **errmsg)); + + /* Extraction function. This is used by the disassembler. To + extract this operand type from an instruction, check this field. + + If it is NULL, compute + op = ((i) >> o->shift) & ((1 << o->bits) - 1); + if ((o->flags & I370_OPERAND_SIGNED) != 0 + && (op & (1 << (o->bits - 1))) != 0) + op -= 1 << o->bits; + (i is the instruction, o is a pointer to this structure, and op + is the result; this assumes twos complement arithmetic). + + If this field is not NULL, then simply call it with the + instruction value. It will return the value of the operand. If + the INVALID argument is not NULL, *INVALID will be set to + non-zero if this operand type can not actually be extracted from + this operand (i.e., the instruction does not match). If the + operand is valid, *INVALID will not be changed. */ + long (*extract) PARAMS ((i370_insn_t instruction, int *invalid)); + + /* One bit syntax flags. */ + unsigned long flags; + + /* name -- handy for debugging, otherwise pointless */ + char * name; +}; + +/* Elements in the table are retrieved by indexing with values from + the operands field of the i370_opcodes table. */ + +extern const struct i370_operand i370_operands[]; + +/* Values defined for the flags field of a struct i370_operand. */ + +/* This operand should be wrapped in parentheses rather than + separated from the previous by a comma. This is used for S, RS and + SS form instructions which want their operands to look like + reg,displacement(basereg) */ +#define I370_OPERAND_SBASE (0x01) + +/* This operand is a base register. It may or may not appear next + to an index register, i.e. either of the two forms + reg,displacement(basereg) + reg,displacement(index,basereg) */ +#define I370_OPERAND_BASE (0x02) + +/* This pair of operands should be wrapped in parentheses rather than + separated from the last by a comma. This is used for the RX form + instructions which want their operands to look like + reg,displacement(index,basereg) */ +#define I370_OPERAND_INDEX (0x04) + +/* This operand names a register. The disassembler uses this to print + register names with a leading 'r'. */ +#define I370_OPERAND_GPR (0x08) + +/* This operand names a floating point register. The disassembler + prints these with a leading 'f'. */ +#define I370_OPERAND_FPR (0x10) + +/* This operand is a displacement. */ +#define I370_OPERAND_RELATIVE (0x20) + +/* This operand is a length, such as that in SS form instructions. */ +#define I370_OPERAND_LENGTH (0x40) + +/* This operand is optional, and is zero if omitted. This is used for + the optional B2 field in the shift-left, shift-right instructions. The + assembler must count the number of operands remaining on the line, + and the number of operands remaining for the opcode, and decide + whether this operand is present or not. The disassembler should + print this operand out only if it is not zero. */ +#define I370_OPERAND_OPTIONAL (0x80) + + +/* Define some misc macros. We keep them with the operands table + for simplicity. The macro table is an array of struct i370_macro. */ + +struct i370_macro +{ + /* The macro name. */ + const char *name; + + /* The number of operands the macro takes. */ + unsigned int operands; + + /* One bit flags for the opcode. These are used to indicate which + specific processors support the instructions. The values are the + same as those for the struct i370_opcode flags field. */ + unsigned long flags; + + /* A format string to turn the macro into a normal instruction. + Each %N in the string is replaced with operand number N (zero + based). */ + const char *format; +}; + +extern const struct i370_macro i370_macros[]; +extern const int i370_num_macros; + + +#endif /* I370_H */ diff --git a/ld/ChangeLog b/ld/ChangeLog index 7d6db0e..97972e1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2000-02-23 Linas Vepstas (linas@linas.org) + + * emulparams/elf32i370.sh, scripttempl/elfi370.sc: New. + + * Makefile.am: Add support for Linux/IBM 370. + * configure.tgt: Likewise. + + * Makefile.in: Regenerate. + 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au> * ldlang.c (print_input_section, print_data_statement, diff --git a/ld/Makefile.am b/ld/Makefile.am index 1edc12f..e7eef06 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -125,6 +125,7 @@ ALL_EMULATIONS = \ eelf32ebmip.o \ eelf32elmip.o \ eelf32bmipn32.o \ + eelf32i370.o \ eelf32l4300.o \ eelf32lmip.o \ eelf32lppc.o \ @@ -391,6 +392,9 @@ eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \ eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)" +eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)" eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)" diff --git a/ld/Makefile.in b/ld/Makefile.in index 94536dd..c5675b7 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -230,6 +230,7 @@ ALL_EMULATIONS = \ eelf32ebmip.o \ eelf32elmip.o \ eelf32bmipn32.o \ + eelf32i370.o \ eelf32l4300.o \ eelf32lmip.o \ eelf32lppc.o \ @@ -1092,6 +1093,9 @@ eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \ eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfppc.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)" +eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)" eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)" diff --git a/ld/configure.tgt b/ld/configure.tgt index 0ef296e..ef66762 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -67,6 +67,8 @@ m68*-wrs-vxworks*) targ_emul=sun3 ;; m68*-ericsson-ose) targ_emul=sun3 ;; m68*-apple-aux*) targ_emul=m68kaux ;; *-tandem-none) targ_emul=st2000 ;; +i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;; +i370-*-mvs*) targ_emul=mvs ;; i[3456]86-*-vsta) targ_emul=vsta ;; i[3456]86-go32-rtems*) targ_emul=i386go32 ;; i[3456]86-*-go32) targ_emul=i386go32 ;; diff --git a/ld/emulparams/elf32i370.sh b/ld/emulparams/elf32i370.sh new file mode 100644 index 0000000..d9d5d85 --- /dev/null +++ b/ld/emulparams/elf32i370.sh @@ -0,0 +1,8 @@ +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +SCRIPT_NAME=elfi370 +OUTPUT_FORMAT="elf32-i370" +TEXT_START_ADDR=0x01800000 +MAXPAGESIZE=0x40000 +ARCH=i370 +MACHINE= diff --git a/ld/scripttempl/elfi370.sc b/ld/scripttempl/elfi370.sc new file mode 100644 index 0000000..e2f0e88 --- /dev/null +++ b/ld/scripttempl/elfi370.sc @@ -0,0 +1,218 @@ +# +# This is just a raw copy of elfppc.sc and has not been otherwise modified +# +# Unusual variables checked by this code: +# NOP - two byte opcode for no-op (defaults to 0) +# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start +# OTHER_READONLY_SECTIONS - other than .text .init .rodata ... +# (e.g., .PARISC.milli) +# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ... +# (e.g., .PARISC.global) +# OTHER_SECTIONS - at the end +# EXECUTABLE_SYMBOLS - symbols that must be defined for an +# executable (e.g., _DYNAMIC_LINK) +# TEXT_START_SYMBOLS - symbols that appear at the start of the +# .text section. +# DATA_START_SYMBOLS - symbols that appear at the start of the +# .data section. +# OTHER_BSS_SYMBOLS - symbols that appear at the start of the +# .bss section besides __bss_start. +# +# When adding sections, do note that the names of some sections are used +# when specifying the start address of the next. +# +test -z "$ENTRY" && ENTRY=_start +test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT} +test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} +test "$LD_FLAG" = "N" && DATA_ADDR=. +SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) }" +SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) }" +INTERP=".interp ${RELOCATING-0} : { *(.interp) }" +PLT=".plt ${RELOCATING-0} : { *(.plt) }" +cat <<EOF +OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", + "${LITTLE_OUTPUT_FORMAT}") +OUTPUT_ARCH(${ARCH}) +ENTRY(${ENTRY}) + +${RELOCATING+${LIB_SEARCH_DIRS}} +${RELOCATING+/* Do we need any of these for elf? + __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */} +${RELOCATING+${EXECUTABLE_SYMBOLS}} +${RELOCATING- /* For some reason, the Solaris linker makes bad executables + if gld -r is used and the intermediate file has sections starting + at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld + bug. But for now assigning the zero vmas works. */} + +${RELOCATING+PROVIDE (__stack = 0);} +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + ${CREATE_SHLIB-${RELOCATING+. = ${TEXT_START_ADDR} + SIZEOF_HEADERS;}} + ${CREATE_SHLIB+${RELOCATING+. = SIZEOF_HEADERS;}} + ${CREATE_SHLIB-${INTERP}} + .hash ${RELOCATING-0} : { *(.hash) } + .dynsym ${RELOCATING-0} : { *(.dynsym) } + .dynstr ${RELOCATING-0} : { *(.dynstr) } + .gnu.version ${RELOCATING-0} : { *(.gnu.version) } + .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) } + .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) } + .rela.text ${RELOCATING-0} : + { *(.rela.text) *(.rela.gnu.linkonce.t*) } + .rela.data ${RELOCATING-0} : + { *(.rela.data) *(.rela.gnu.linkonce.d*) } + .rela.rodata ${RELOCATING-0} : + { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } + .rela.got ${RELOCATING-0} : { *(.rela.got) } + .rela.got1 ${RELOCATING-0} : { *(.rela.got1) } + .rela.got2 ${RELOCATING-0} : { *(.rela.got2) } + .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) } + .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) } + .rela.init ${RELOCATING-0} : { *(.rela.init) } + .rela.fini ${RELOCATING-0} : { *(.rela.fini) } + .rela.bss ${RELOCATING-0} : { *(.rela.bss) } + .rela.plt ${RELOCATING-0} : { *(.rela.plt) } + .rela.sdata ${RELOCATING-0} : { *(.rela.sdata) } + .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) } + .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2) } + .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2) } + .text ${RELOCATING-0} : + { + ${RELOCATING+${TEXT_START_SYMBOLS}} + *(.text) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + } =${NOP-0} + .init ${RELOCATING-0} : { *(.init) } =${NOP-0} + .fini ${RELOCATING-0} : { *(.fini) } =${NOP-0} + .rodata ${RELOCATING-0} : { *(.rodata) *(.gnu.linkonce.r*) } + .rodata1 ${RELOCATING-0} : { *(.rodata1) } + ${RELOCATING+_etext = .;} + ${RELOCATING+PROVIDE (etext = .);} + ${CREATE_SHLIB-${SDATA2}} + ${CREATE_SHLIB-${SBSS2}} + ${RELOCATING+${OTHER_READONLY_SECTIONS}} + + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. It would + be more correct to do this: + ${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (ALIGN(8) & (${MAXPAGESIZE} - 1))};} + The current expression does not correctly handle the case of a + text segment ending precisely at the end of a page; it causes the + data segment to skip a page. The above expression does not have + this problem, but it will currently (2/95) cause BFD to allocate + a single segment, combining both text and data, for this case. + This will prevent the text segment from being shared among + multiple executions of the program; I think that is more + important than losing a page of the virtual address space (note + that no actual memory is lost; the page which is skipped can not + be referenced). */ + ${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};} + + .data ${RELOCATING-0} : + { + ${RELOCATING+${DATA_START_SYMBOLS}} + *(.data) + *(.gnu.linkonce.d*) + ${CONSTRUCTING+CONSTRUCTORS} + } + .data1 ${RELOCATING-0} : { *(.data1) } + ${RELOCATING+${OTHER_READWRITE_SECTIONS}} + + .got1 ${RELOCATING-0} : { *(.got1) } + .dynamic ${RELOCATING-0} : { *(.dynamic) } + + /* Put .ctors and .dtors next to the .got2 section, so that the pointers + get relocated with -mrelocatable. Also put in the .fixup pointers. + The current compiler no longer needs this, but keep it around for 2.7.2 */ + + ${RELOCATING+PROVIDE (_GOT2_START_ = .);} + .got2 ${RELOCATING-0} : { *(.got2) } + + ${RELOCATING+PROVIDE (__CTOR_LIST__ = .);} + .ctors ${RELOCATING-0} : { *(.ctors) } + ${RELOCATING+PROVIDE (__CTOR_END__ = .);} + + ${RELOCATING+PROVIDE (__DTOR_LIST__ = .);} + .dtors ${RELOCATING-0} : { *(.dtors) } + ${RELOCATING+PROVIDE (__DTOR_END__ = .);} + + ${RELOCATING+PROVIDE (_FIXUP_START_ = .);} + .fixup ${RELOCATING-0} : { *(.fixup) } + ${RELOCATING+PROVIDE (_FIXUP_END_ = .);} + ${RELOCATING+PROVIDE (_GOT2_END_ = .);} + + ${RELOCATING+PROVIDE (_GOT_START_ = .);} + .got ${RELOCATING-0} : { *(.got) } + .got.plt ${RELOCATING-0} : { *(.got.plt) } + ${CREATE_SHLIB+${SDATA2}} + ${CREATE_SHLIB+${SBSS2}} + ${RELOCATING+PROVIDE (_GOT_END_ = .);} + + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata ${RELOCATING-0} : { *(.sdata) } + ${RELOCATING+_edata = .;} + ${RELOCATING+PROVIDE (edata = .);} + .sbss ${RELOCATING-0} : + { + ${RELOCATING+PROVIDE (__sbss_start = .);} + *(.sbss) + *(.scommon) + *(.dynsbss) + ${RELOCATING+PROVIDE (__sbss_end = .);} + } + ${PLT} + .bss ${RELOCATING-0} : + { + ${RELOCATING+${OTHER_BSS_SYMBOLS}} + ${RELOCATING+PROVIDE (__bss_start = .);} + *(.dynbss) + *(.bss) + *(COMMON) + } + ${RELOCATING+_end = . ;} + ${RELOCATING+PROVIDE (end = .);} + + /* These are needed for ELF backends which have not yet been + converted to the new style linker. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + + /* These must appear regardless of ${RELOCATING}. */ + ${OTHER_SECTIONS} +} +EOF diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index d18383b..7ab14ee 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,16 @@ +2000-02-23 Linas Vepstas <linas@linas.org> + + * i370-dis.c, i370-opc.c: New. + + * disassemble.c (ARCH_i370): Define. + (disassembler): Handle it. + + * Makefile.am: Add support for Linux/IBM 370. + * configure.in: Likewise. + + * Makefile.in: Regenerate. + * configure: Likewise. + 2000-02-22 Chandra Chavva <cchavva@cygnus.com> * d30v-opc.c (d30v_opcode_tab) : Added FLAG_NOT_WITH_ADDSUBppp to diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am index 60d17f6..1ab8d79 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am @@ -50,6 +50,8 @@ CFILES = \ h8300-dis.c \ h8500-dis.c \ hppa-dis.c \ + i370-dis.c \ + i370-opc.c \ i386-dis.c \ i960-dis.c \ m32r-asm.c \ @@ -110,6 +112,8 @@ ALL_MACHINES = \ h8500-dis.lo \ hppa-dis.lo \ i386-dis.lo \ + i370-dis.lo \ + i370-opc.lo \ i960-dis.lo \ m32r-asm.lo \ m32r-desc.lo \ diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in index 4183ac7..277f503 100644 --- a/opcodes/Makefile.in +++ b/opcodes/Makefile.in @@ -156,6 +156,8 @@ CFILES = \ h8300-dis.c \ h8500-dis.c \ hppa-dis.c \ + i370-dis.c \ + i370-opc.c \ i386-dis.c \ i960-dis.c \ m32r-asm.c \ @@ -217,6 +219,8 @@ ALL_MACHINES = \ h8500-dis.lo \ hppa-dis.lo \ i386-dis.lo \ + i370-dis.lo \ + i370-opc.lo \ i960-dis.lo \ m32r-asm.lo \ m32r-desc.lo \ diff --git a/opcodes/configure b/opcodes/configure index e6e5029..34e79f0 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 +# Generated automatically using autoconf version 2.13.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -49,7 +49,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -164,7 +163,6 @@ 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 @@ -335,11 +333,6 @@ 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=*) @@ -361,7 +354,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" + echo "configure generated by autoconf version 2.13.1" exit 0 ;; -with-* | --with-*) @@ -505,16 +498,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -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 +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 -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -525,7 +514,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -569,9 +558,130 @@ done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:568: checking host system type" >&5 +if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_host_alias=$host + case "$ac_cv_host_alias" in + NONE) + case $nonopt in + NONE) + if ac_cv_host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) ac_cv_host_alias=$nonopt ;; + esac ;; + esac + + ac_cv_host=`$ac_config_sub $ac_cv_host_alias` + ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_host" 1>&6 + +host=$ac_cv_host +host_alias=$ac_cv_host_alias +host_cpu=$ac_cv_host_cpu +host_vendor=$ac_cv_host_vendor +host_os=$ac_cv_host_os + + + + + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:609: checking target system type" >&5 +if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_target_alias=$target + case "$ac_cv_target_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_target_alias=$host_alias ;; + + *) ac_cv_target_alias=$nonopt ;; + esac ;; + esac + + ac_cv_target=`$ac_config_sub $ac_cv_target_alias` + ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_target" 1>&6 + +target=$ac_cv_target +target_alias=$ac_cv_target_alias +target_cpu=$ac_cv_target_cpu +target_vendor=$ac_cv_target_vendor +target_os=$ac_cv_target_os + + + + + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:649: checking build system type" >&5 +if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then + +# Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + ac_cv_build_alias=$build + case "$ac_cv_build_alias" in + NONE) + case $nonopt in + NONE) + ac_cv_build_alias=$host_alias ;; + + *) ac_cv_build_alias=$nonopt ;; + esac ;; + esac + + ac_cv_build=`$ac_config_sub $ac_cv_build_alias` + ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +else + echo $ac_n "(cached) $ac_c" 1>&6 +fi + +echo "$ac_t""$ac_cv_build" 1>&6 + +build=$ac_cv_build +build_alias=$ac_cv_build_alias +build_cpu=$ac_cv_build_cpu +build_vendor=$ac_cv_build_vendor +build_os=$ac_cv_build_os + + + # Do some error checking and defaulting for the host and target type. @@ -594,69 +704,6 @@ NONE---*---* | *---NONE---* | *---*---NONE) ;; *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; esac - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -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:605: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -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:626: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -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:644: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && @@ -665,8 +712,8 @@ test "$host_alias" != "$target_alias" && # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:669: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:716: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -695,8 +742,8 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:699: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:746: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -742,12 +789,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:750: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:797: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -777,8 +824,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:782: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:829: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -789,12 +836,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 793 "configure" +#line 840 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -819,14 +866,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:824: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:871: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:829: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:876: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF @@ -834,7 +881,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -853,8 +900,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:857: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:904: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -885,7 +932,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:889: checking for POSIXized ISC" >&5 +echo "configure:936: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -923,9 +970,9 @@ BFD_VERSION=`grep INIT_AUTOMAKE ${srcdir}/../bfd/configure.in | sed -n -e 's/[ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:927: checking for a BSD compatible install" >&5 +echo "configure:974: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -943,6 +990,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -971,12 +1022,12 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:980: checking whether build environment is sane" >&5 +echo "configure:1031: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1024,18 +1075,18 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1037: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1088: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF @@ -1079,7 +1130,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1083: checking for working aclocal" >&5 +echo "configure:1134: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1092,7 +1143,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1096: checking for working autoconf" >&5 +echo "configure:1147: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1105,7 +1156,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1109: checking for working automake" >&5 +echo "configure:1160: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1118,7 +1169,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1122: checking for working autoheader" >&5 +echo "configure:1173: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1131,7 +1182,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1135: checking for working makeinfo" >&5 +echo "configure:1186: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1154,8 +1205,8 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1158: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then +echo "configure:1209: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then @@ -1186,8 +1237,8 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1190: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1241: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1218,8 +1269,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1222: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1273: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1324,8 +1375,8 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1328: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +echo "configure:1379: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1363,7 +1414,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1367: checking for ld used by GCC" >&5 +echo "configure:1418: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1387,12 +1438,12 @@ echo "configure:1367: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1391: checking for GNU ld" >&5 +echo "configure:1442: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1394: checking for non-GNU ld" >&5 +echo "configure:1445: checking for non-GNU ld" >&5 fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then @@ -1426,8 +1477,8 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1430: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then +echo "configure:1481: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -1442,8 +1493,8 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1446: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then +echo "configure:1497: checking for BSD-compatible nm" >&5 +if eval "test \"\${ac_cv_path_NM+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then @@ -1480,8 +1531,8 @@ echo "$ac_t""$NM" 1>&6 # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 -echo "configure:1484: checking command to parse $NM output" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then +echo "configure:1535: checking command to parse $NM output" >&5 +if eval "test \"\${ac_cv_sys_global_symbol_pipe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # These are sane defaults that work on at least a few old systems. @@ -1543,11 +1594,11 @@ void nm_test_func(){} int main(){nm_test_var='a';nm_test_func;return 0;} EOF - if { (eval echo configure:1547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1551: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1602: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # Try sorting and uniquifying the output. if sort "$ac_nlist" | uniq > "$ac_nlist"T; then @@ -1599,7 +1650,7 @@ EOF ac_save_CFLAGS="$CFLAGS" LIBS="conftestm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo configure:1654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_pipe_works=yes else echo "configure: failed program was:" >&5 @@ -1645,8 +1696,8 @@ fi echo "$ac_t""$ac_result" 1>&6 echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6 -echo "configure:1649: checking for _ prefix in compiled symbols" >&5 -if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then +echo "configure:1700: checking for _ prefix in compiled symbols" >&5 +if eval "test \"\${ac_cv_sys_symbol_underscore+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_sys_symbol_underscore=no @@ -1654,10 +1705,10 @@ cat > conftest.$ac_ext <<EOF void nm_test_func(){} int main(){nm_test_func;return 0;} EOF -if { (eval echo configure:1658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1661: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1712: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes @@ -1683,8 +1734,8 @@ echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no} echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1687: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +echo "configure:1738: checking whether ln -s works" >&5 +if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata @@ -1719,8 +1770,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1723 "configure"' > conftest.$ac_ext - if { (eval echo configure:1724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1774 "configure"' > conftest.$ac_ext + if { (eval echo configure:1775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1741,19 +1792,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1745: checking whether the C compiler needs -belf" >&5 -if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then +echo "configure:1796: checking whether the C compiler needs -belf" >&5 +if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1750 "configure" +#line 1801 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1776,8 +1827,8 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1780: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then +echo "configure:1831: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1808,8 +1859,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1812: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then +echo "configure:1863: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1843,8 +1894,8 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1847: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then +echo "configure:1898: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1875,8 +1926,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1879: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then +echo "configure:1930: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1988,7 +2039,7 @@ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then echo "loading cache $cache_file" - . $cache_file + test -f "$cache_file" && . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -2044,17 +2095,17 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},; $program_transform_name" + program_transform_name="s,^,${program_prefix},;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2058: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2109: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2077,12 +2128,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:2081: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then +echo "configure:2132: checking for Cygwin environment" >&5 +if eval "test \"\${ac_cv_cygwin+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2086 "configure" +#line 2137 "configure" #include "confdefs.h" int main() { @@ -2093,7 +2144,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:2097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -2103,26 +2154,25 @@ else ac_cv_cygwin=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:2114: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then +echo "configure:2164: checking for mingw32 environment" >&5 +if eval "test \"\${ac_cv_mingw32+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2119 "configure" +#line 2169 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:2126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -2132,29 +2182,57 @@ else ac_cv_mingw32=no fi rm -f conftest* -rm -f conftest* fi echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes +echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6 +echo "configure:2192: checking for EMX OS/2 environment" >&5 +if eval "test \"\${ac_cv_emxos2+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2197 "configure" +#include "confdefs.h" + +int main() { +return __EMX__; +; return 0; } +EOF +if { (eval echo configure:2204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_emxos2=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_emxos2=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_emxos2" 1>&6 +EMXOS2= +test "$ac_cv_emxos2" = yes && EMXOS2=yes + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2145: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then +echo "configure:2223: checking for executable suffix" >&5 +if eval "test \"\${ac_cv_exeext+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then ac_cv_exeext=.exe else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.C | *.o | *.obj | *.xcoff) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2177,8 +2255,8 @@ ac_exeext=$EXEEXT # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2181: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2259: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2207,8 +2285,8 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2211: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2289: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2254,12 +2332,12 @@ fi if test -z "$CC"; then case "`uname -s`" in - *win32* | *WIN32*) + *win32* | *WIN32* | *CYGWIN*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2262: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then +echo "configure:2340: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2289,8 +2367,8 @@ fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2294: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:2372: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2301,12 +2379,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2305 "configure" +#line 2383 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2331,14 +2409,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2336: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:2414: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2341: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then +echo "configure:2419: checking whether we are using GNU C" >&5 +if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF @@ -2346,7 +2424,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2365,8 +2443,8 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2369: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then +echo "configure:2447: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -2399,13 +2477,13 @@ fi ALL_LINGUAS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2403: checking how to run the C preprocessor" >&5 +echo "configure:2481: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -2414,13 +2492,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2418 "configure" +#line 2496 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2431,13 +2509,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2435 "configure" +#line 2513 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2448,13 +2526,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2452 "configure" +#line 2530 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2479,12 +2557,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2483: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then +echo "configure:2561: checking for ANSI C header files" >&5 +if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2488 "configure" +#line 2566 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2492,7 +2570,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2509,7 +2587,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2513 "configure" +#line 2591 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2527,7 +2605,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2531 "configure" +#line 2609 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2548,7 +2626,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2552 "configure" +#line 2630 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2559,7 +2637,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2583,12 +2661,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2587: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then +echo "configure:2665: checking for working const" >&5 +if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2592 "configure" +#line 2670 "configure" #include "confdefs.h" int main() { @@ -2637,7 +2715,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2658,21 +2736,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2662: checking for inline" >&5 -if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then +echo "configure:2740: checking for inline" >&5 +if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 2669 "configure" +#line 2747 "configure" #include "confdefs.h" int main() { -} $ac_kw foo() { +} $ac_kw int foo() { ; return 0; } EOF -if { (eval echo configure:2676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2698,12 +2776,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2702: checking for off_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then +echo "configure:2780: checking for off_t" >&5 +if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2707 "configure" +#line 2785 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2714,29 +2792,31 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_off_t=yes + eval "ac_cv_type_off_t=yes" else rm -rf conftest* - ac_cv_type_off_t=no + eval "ac_cv_type_off_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<EOF #define off_t long EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2735: checking for size_t" >&5 -if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then +echo "configure:2815: checking for size_t" >&5 +if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2740 "configure" +#line 2820 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2747,17 +2827,19 @@ EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* - ac_cv_type_size_t=yes + eval "ac_cv_type_size_t=yes" else rm -rf conftest* - ac_cv_type_size_t=no + eval "ac_cv_type_size_t=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = no; then - cat >> confdefs.h <<\EOF +if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + cat >> confdefs.h <<EOF #define size_t unsigned EOF @@ -2766,19 +2848,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2770: checking for working alloca.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then +echo "configure:2852: checking for working alloca.h" >&5 +if eval "test \"\${ac_cv_header_alloca_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2775 "configure" +#line 2857 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2799,12 +2881,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2803: checking for alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then +echo "configure:2885: checking for alloca" >&5 +if eval "test \"\${ac_cv_func_alloca_works+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2808 "configure" +#line 2890 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -2832,7 +2914,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:2836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2864,12 +2946,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2868: checking whether alloca needs Cray hooks" >&5 -if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then +echo "configure:2950: checking whether alloca needs Cray hooks" >&5 +if eval "test \"\${ac_cv_os_cray+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2873 "configure" +#line 2955 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2894,12 +2976,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2898: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:2980: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2903 "configure" +#line 2985 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2908,6 +2990,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -2917,12 +3000,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2949,15 +3032,15 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2953: checking stack direction for C alloca" >&5 -if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then +echo "configure:3036: checking stack direction for C alloca" >&5 +if eval "test \"\${ac_cv_c_stack_direction+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2961 "configure" +#line 3044 "configure" #include "confdefs.h" find_stack_direction () { @@ -2976,7 +3059,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3001,17 +3084,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3005: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3088: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3010 "configure" +#line 3093 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3040,12 +3123,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3044: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3127: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3049 "configure" +#line 3132 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3054,6 +3137,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3063,12 +3147,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3093,15 +3177,15 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3097: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +echo "configure:3181: checking for working mmap" >&5 +if eval "test \"\${ac_cv_func_mmap_fixed_mapped+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3105 "configure" +#line 3189 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3241,7 +3325,7 @@ main() } EOF -if { (eval echo configure:3245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3269,17 +3353,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3273: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3357: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3278 "configure" +#line 3362 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3309,12 +3393,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3313: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3397: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3318 "configure" +#line 3402 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3323,6 +3407,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3332,12 +3417,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3366,12 +3451,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3370: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3455: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3375 "configure" +#line 3460 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3380,6 +3465,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3389,12 +3475,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3428,19 +3514,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3432: checking for LC_MESSAGES" >&5 -if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then +echo "configure:3518: checking for LC_MESSAGES" >&5 +if eval "test \"\${am_cv_val_LC_MESSAGES+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3437 "configure" +#line 3523 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3461,7 +3547,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3465: checking whether NLS is requested" >&5 +echo "configure:3551: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3481,7 +3567,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3485: checking whether included gettext is requested" >&5 +echo "configure:3571: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3500,17 +3586,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3504: checking for libintl.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:3590: checking for libintl.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3509 "configure" +#line 3595 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3527,19 +3613,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3531: checking for gettext in libc" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then +echo "configure:3617: checking for gettext in libc" >&5 +if eval "test \"\${gt_cv_func_gettext_libc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3536 "configure" +#line 3622 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3555,15 +3641,15 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3559: checking for bindtextdomain in -lintl" >&5 -ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +echo "configure:3645: checking for bindtextdomain in -lintl" >&5 +ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-:%__p__%'` +if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3567 "configure" +#line 3653 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3574,7 +3660,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3590,19 +3676,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3594: checking for gettext in libintl" >&5 -if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then +echo "configure:3680: checking for gettext in libintl" >&5 +if eval "test \"\${gt_cv_func_gettext_libintl+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3599 "configure" +#line 3685 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3630,8 +3716,8 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3634: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:3720: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3664,12 +3750,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3668: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +echo "configure:3754: checking for $ac_func" >&5 +if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3673 "configure" +#line 3759 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3678,6 +3764,7 @@ else /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); +char (*f)(); int main() { @@ -3687,12 +3774,12 @@ int main() { #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif ; return 0; } EOF -if { (eval echo configure:3696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3719,8 +3806,8 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3723: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:3810: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -3755,8 +3842,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3759: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:3846: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -3787,7 +3874,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 3791 "configure" +#line 3878 "configure" #include "confdefs.h" int main() { @@ -3795,7 +3882,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3827,8 +3914,8 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3831: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then +echo "configure:3918: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_MSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3861,8 +3948,8 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3865: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then +echo "configure:3952: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_GMSGFMT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in @@ -3897,8 +3984,8 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3901: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then +echo "configure:3988: checking for $ac_word" >&5 +if eval "test \"\${ac_cv_path_XGETTEXT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -3987,7 +4074,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3991: checking for catalogs to be installed" >&5 +echo "configure:4078: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4015,17 +4102,17 @@ echo "configure:3991: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4019: checking for linux/version.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4106: checking for linux/version.h" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4024 "configure" +#line 4111 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4102,9 +4189,9 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:4106: checking for a BSD compatible install" >&5 +echo "configure:4193: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then +if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -4122,6 +4209,10 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -4150,7 +4241,7 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' @@ -4159,17 +4250,17 @@ for ac_hdr in string.h strings.h stdlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4163: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +echo "configure:4254: checking for $ac_hdr" >&5 +if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4168 "configure" +#line 4259 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4269,6 +4360,7 @@ if test x${all_targets} = xfalse ; then bfd_h8300_arch) ta="$ta h8300-dis.lo" ;; bfd_h8500_arch) ta="$ta h8500-dis.lo" ;; bfd_hppa_arch) ta="$ta hppa-dis.lo" ;; + bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;; bfd_i386_arch) ta="$ta i386-dis.lo" ;; bfd_i860_arch) ;; bfd_i960_arch) ta="$ta i960-dis.lo" ;; @@ -4427,7 +4519,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" + echo "$CONFIG_STATUS generated by autoconf version 2.13.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -4756,5 +4848,5 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 diff --git a/opcodes/configure.in b/opcodes/configure.in index f1c94b2..72b9fd2 100644 --- a/opcodes/configure.in +++ b/opcodes/configure.in @@ -140,6 +140,7 @@ if test x${all_targets} = xfalse ; then bfd_h8300_arch) ta="$ta h8300-dis.lo" ;; bfd_h8500_arch) ta="$ta h8500-dis.lo" ;; bfd_hppa_arch) ta="$ta hppa-dis.lo" ;; + bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;; bfd_i386_arch) ta="$ta i386-dis.lo" ;; bfd_i860_arch) ;; bfd_i960_arch) ta="$ta i960-dis.lo" ;; diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c index b961be3..5aaf755 100644 --- a/opcodes/disassemble.c +++ b/opcodes/disassemble.c @@ -1,5 +1,6 @@ /* Select disassembly routine for specified architecture. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ARCH_h8300 #define ARCH_h8500 #define ARCH_hppa +#define ARCH_i370 #define ARCH_i386 #define ARCH_i960 #define ARCH_fr30 @@ -121,6 +123,11 @@ disassembler (abfd) disassemble = print_insn_hppa; break; #endif +#ifdef ARCH_i370 + case bfd_arch_i370: + disassemble = print_insn_i370; + break; +#endif #ifdef ARCH_i386 case bfd_arch_i386: if (bfd_get_mach (abfd) == bfd_mach_i386_i386_intel_syntax) diff --git a/opcodes/i370-dis.c b/opcodes/i370-dis.c new file mode 100644 index 0000000..a992c76 --- /dev/null +++ b/opcodes/i370-dis.c @@ -0,0 +1,167 @@ + +/* i370-dis.c -- Disassemble Instruction 370 (ESA/390) instructions + Copyright 1994, 2000 Free Software Foundation, Inc. + PowerPC version written by Ian Lance Taylor, Cygnus Support + Rewritten for i370 ESA/390 support by Linas Vepstas <linas@linas.org> + +This file is part of GDB, GAS, and the GNU binutils. + +GDB, GAS, and the GNU binutils are free software; you can redistribute +them and/or modify them under the terms of the GNU General Public +License as published by the Free Software Foundation; either version +2, or (at your option) any later version. + +GDB, GAS, and the GNU binutils are distributed in the hope that they +will be useful, but WITHOUT ANY WARRANTY; without even the implied +warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this file; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include <stdio.h> +#include "ansidecl.h" +#include "sysdep.h" +#include "dis-asm.h" +#include "opcode/i370.h" + +/* This file provides several disassembler functions, all of which use + the disassembler interface defined in dis-asm.h. +*/ + +int +print_insn_i370 (memaddr, info) + bfd_vma memaddr; + struct disassemble_info *info; +{ + bfd_byte buffer[8]; + int status; + i370_insn_t insn; + const struct i370_opcode *opcode; + const struct i370_opcode *opcode_end; + + status = (*info->read_memory_func) (memaddr, buffer, 6, info); + if (status != 0) + { + (*info->memory_error_func) (status, memaddr, info); + return -1; + } + + /* Cast the bytes into the insn (in a host-endian indep way) */ + insn.i[0] = (buffer[0] << 24) & 0xff000000; + insn.i[0] |= (buffer[1] << 16) & 0xff0000; + insn.i[0] |= (buffer[2] << 8) & 0xff00; + insn.i[0] |= buffer[3] & 0xff; + insn.i[1] = (buffer[4] << 24) & 0xff000000; + insn.i[1] |= (buffer[5] << 16) & 0xff0000; + + /* Find the first match in the opcode table. We could speed this up + a bit by doing a binary search on the major opcode. */ + opcode_end = i370_opcodes + i370_num_opcodes; + for (opcode = i370_opcodes; opcode < opcode_end; opcode++) + { + const unsigned char *opindex; + const struct i370_operand *operand; + i370_insn_t masked; + int invalid; + + /* Mask off operands, and look for a match ... */ + masked = insn; + if (2 == opcode->len) + { + masked.i[0] >>= 16; + masked.i[0] &= 0xffff; + } + masked.i[0] &= opcode->mask.i[0]; + if (masked.i[0] != opcode->opcode.i[0]) continue; + + if (6 == opcode->len) + { + masked.i[1] &= opcode->mask.i[1]; + if (masked.i[1] != opcode->opcode.i[1]) continue; + } + + /* Found a match. adjust a tad */ + if (2 == opcode->len) + { + insn.i[0] >>= 16; + insn.i[0] &= 0xffff; + } + + /* Make two passes over the operands. First see if any of them + have extraction functions, and, if they do, make sure the + instruction is valid. */ + invalid = 0; + for (opindex = opcode->operands; *opindex != 0; opindex++) + { + operand = i370_operands + *opindex; + if (operand->extract) + (*operand->extract) (insn, &invalid); + } + if (invalid) continue; + + /* The instruction is valid. */ + (*info->fprintf_func) (info->stream, "%s", opcode->name); + if (opcode->operands[0] != 0) + (*info->fprintf_func) (info->stream, "\t"); + + /* Now extract and print the operands. */ + for (opindex = opcode->operands; *opindex != 0; opindex++) + { + long value; + + operand = i370_operands + *opindex; + + /* Extract the value from the instruction. */ + if (operand->extract) + value = (*operand->extract) (insn, (int *) NULL); + else + { + value = (insn.i[0] >> operand->shift) & ((1 << operand->bits) - 1); + } + + /* Print the operand as directed by the flags. */ + if ((operand->flags & I370_OPERAND_OPTIONAL) != 0) + { + if (value) + (*info->fprintf_func) (info->stream, "(r%ld)", value); + } + else if ((operand->flags & I370_OPERAND_SBASE) != 0) + { + (*info->fprintf_func) (info->stream, "(r%ld)", value); + } + else if ((operand->flags & I370_OPERAND_INDEX) != 0) + { + if (value) + (*info->fprintf_func) (info->stream, "(r%ld,", value); + else + (*info->fprintf_func) (info->stream, "(,"); + } + else if ((operand->flags & I370_OPERAND_LENGTH) != 0) + { + (*info->fprintf_func) (info->stream, "(%ld,", value); + } + else if ((operand->flags & I370_OPERAND_BASE) != 0) + (*info->fprintf_func) (info->stream, "r%ld)", value); + else if ((operand->flags & I370_OPERAND_GPR) != 0) + (*info->fprintf_func) (info->stream, "r%ld,", value); + else if ((operand->flags & I370_OPERAND_FPR) != 0) + (*info->fprintf_func) (info->stream, "f%ld,", value); + else if ((operand->flags & I370_OPERAND_RELATIVE) != 0) + (*info->fprintf_func) (info->stream, "%ld", value); + else + (*info->fprintf_func) (info->stream, " %ld, ", value); + + } + + return opcode->len; + + } + + + /* We could not find a match. */ + (*info->fprintf_func) (info->stream, ".short 0x%02x%02x", buffer[0], buffer[1]); + + return 2; +} diff --git a/opcodes/i370-opc.c b/opcodes/i370-opc.c new file mode 100644 index 0000000..632f16b --- /dev/null +++ b/opcodes/i370-opc.c @@ -0,0 +1,959 @@ +/* i370-opc.c -- Instruction 370 (ESA/390) architecture opcode list + Copyright 1994, 1999, 2000 Free Software Foundation, Inc. + PowerPC version written by Ian Lance Taylor, Cygnus Support + Rewritten for i370 ESA/390 support by Linas Vepstas <linas@linas.org> 1998, 1999 + +This file is part of GDB, GAS, and the GNU binutils. + +GDB, GAS, and the GNU binutils are free software; you can redistribute +them and/or modify them under the terms of the GNU General Public +License as published by the Free Software Foundation; either version +2, or (at your option) any later version. + +GDB, GAS, and the GNU binutils are distributed in the hope that they +will be useful, but WITHOUT ANY WARRANTY; without even the implied +warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this file; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ + +#include <stdio.h> +#include "ansidecl.h" +#include "opcode/i370.h" + +/* This file holds the i370 opcode table. The opcode table + includes almost all of the extended instruction mnemonics. This + permits the disassembler to use them, and simplifies the assembler + logic, at the cost of increasing the table size. The table is + strictly constant data, so the compiler should be able to put it in + the .text section. + + This file also holds the operand table. All knowledge about + inserting operands into instructions and vice-versa is kept in this + file. */ + +/* Local insertion and extraction functions. */ +static i370_insn_t insert_ss_b2 PARAMS (( i370_insn_t, long, const char **)); +static i370_insn_t insert_ss_d2 PARAMS (( i370_insn_t, long, const char **)); +static i370_insn_t insert_rxf_r3 PARAMS (( i370_insn_t, long, const char **)); +static long extract_ss_b2 PARAMS (( i370_insn_t, int *)); +static long extract_ss_d2 PARAMS (( i370_insn_t, int *)); +static long extract_rxf_r3 PARAMS (( i370_insn_t, int *)); + + +/* The operands table. + The fields are bits, shift, insert, extract, flags, name. + The types: + I370_OPERAND_GPR register, must name a register, must be present + I370_OPERAND_RELATIVE displacement or legnth field, must be present + I370_OPERAND_BASE base register; if present, must name a register + if absent, should take value of zero + I370_OPERAND_INDEX index register; if present, must name a register + if absent, should take value of zero + I370_OPERAND_OPTIONAL other optional operand (usuall reg?) +*/ + +const struct i370_operand i370_operands[] = +{ + /* The zero index is used to indicate the end of the list of + operands. */ +#define UNUSED 0 + { 0, 0, 0, 0, 0, "unused" }, + + /* The R1 register field in an RR form instruction. */ +#define RR_R1 (UNUSED + 1) +#define RR_R1_MASK (0xf << 4) + { 4, 4, 0, 0, I370_OPERAND_GPR, "RR R1" }, + + /* The R2 register field in an RR form instruction. */ +#define RR_R2 (RR_R1 + 1) +#define RR_R2_MASK (0xf) + { 4, 0, 0, 0, I370_OPERAND_GPR, "RR R2" }, + + /* The I field in an RR form SVC-style instruction. */ +#define RR_I (RR_R2 + 1) +#define RR_I_MASK (0xff) + { 8, 0, 0, 0, I370_OPERAND_RELATIVE, "RR I (svc)" }, + + /* The R1 register field in an RRE form instruction. */ +#define RRE_R1 (RR_I + 1) +#define RRE_R1_MASK (0xf << 4) + { 4, 4, 0, 0, I370_OPERAND_GPR, "RRE R1" }, + + /* The R2 register field in an RRE form instruction. */ +#define RRE_R2 (RRE_R1 + 1) +#define RRE_R2_MASK (0xf) + { 4, 0, 0, 0, I370_OPERAND_GPR, "RRE R2" }, + + /* The R1 register field in an RRF form instruction. */ +#define RRF_R1 (RRE_R2 + 1) +#define RRF_R1_MASK (0xf << 4) + { 4, 4, 0, 0, I370_OPERAND_GPR, "RRF R1" }, + + /* The R2 register field in an RRF form instruction. */ +#define RRF_R2 (RRF_R1 + 1) +#define RRF_R2_MASK (0xf) + { 4, 0, 0, 0, I370_OPERAND_GPR, "RRF R2" }, + + /* The R3 register field in an RRF form instruction. */ +#define RRF_R3 (RRF_R2 + 1) +#define RRF_R3_MASK (0xf << 12) + { 4, 12, 0, 0, I370_OPERAND_GPR, "RRF R3" }, + + /* The R1 register field in an RX or RS form instruction. */ +#define RX_R1 (RRF_R3 + 1) +#define RX_R1_MASK (0xf << 20) + { 4, 20, 0, 0, I370_OPERAND_GPR, "RX R1" }, + + /* The X2 index field in an RX form instruction. */ +#define RX_X2 (RX_R1 + 1) +#define RX_X2_MASK (0xf << 16) + { 4, 16, 0, 0, I370_OPERAND_GPR | I370_OPERAND_INDEX, "RX X2"}, + + /* The B2 base field in an RX form instruction. */ +#define RX_B2 (RX_X2 + 1) +#define RX_B2_MASK (0xf << 12) + { 4, 12, 0, 0, I370_OPERAND_GPR | I370_OPERAND_BASE, "RX B2"}, + + /* The D2 displacement field in an RX form instruction. */ +#define RX_D2 (RX_B2 + 1) +#define RX_D2_MASK (0xfff) + { 12, 0, 0, 0, I370_OPERAND_RELATIVE, "RX D2"}, + + /* The R3 register field in an RXF form instruction. */ +#define RXF_R3 (RX_D2 + 1) +#define RXF_R3_MASK (0xf << 12) + { 4, 12, insert_rxf_r3, extract_rxf_r3, I370_OPERAND_GPR, "RXF R3" }, + + /* The D2 displacement field in an RS form instruction. */ +#define RS_D2 (RXF_R3 + 1) +#define RS_D2_MASK (0xfff) + { 12, 0, 0, 0, I370_OPERAND_RELATIVE, "RS D2"}, + + /* The R3 register field in an RS form instruction. */ +#define RS_R3 (RS_D2 + 1) +#define RS_R3_MASK (0xf << 16) + { 4, 16, 0, 0, I370_OPERAND_GPR, "RS R3" }, + + /* The B2 base field in an RS form instruction. */ +#define RS_B2 (RS_R3 + 1) +#define RS_B2_MASK (0xf << 12) + { 4, 12, 0, 0, I370_OPERAND_GPR | I370_OPERAND_BASE | I370_OPERAND_SBASE, "RS B2"}, + + /* The optional B2 base field in an RS form instruction. */ + /* Note that this field will almost always be absent */ +#define RS_B2_OPT (RS_B2 + 1) +#define RS_B2_OPT_MASK (0xf << 12) + { 4, 12, 0, 0, I370_OPERAND_GPR | I370_OPERAND_OPTIONAL, "RS B2 OPT"}, + + /* The R1 register field in an RSI form instruction. */ +#define RSI_R1 (RS_B2_OPT + 1) +#define RSI_R1_MASK (0xf << 20) + { 4, 20, 0, 0, I370_OPERAND_GPR, "RSI R1" }, + + /* The R3 register field in an RSI form instruction. */ +#define RSI_R3 (RSI_R1 + 1) +#define RSI_R3_MASK (0xf << 16) + { 4, 16, 0, 0, I370_OPERAND_GPR, "RSI R3" }, + + /* The I2 immediate field in an RSI form instruction. */ +#define RSI_I2 (RSI_R3 + 1) +#define RSI_I2_MASK (0xffff) + { 16, 0, 0, 0, I370_OPERAND_RELATIVE, "RSI I2" }, + + /* The R1 register field in an RI form instruction. */ +#define RI_R1 (RSI_I2 + 1) +#define RI_R1_MASK (0xf << 20) + { 4, 20, 0, 0, I370_OPERAND_GPR, "RI R1" }, + + /* The I2 immediate field in an RI form instruction. */ +#define RI_I2 (RI_R1 + 1) +#define RI_I2_MASK (0xffff) + { 16, 0, 0, 0, I370_OPERAND_RELATIVE, "RI I2" }, + + /* The I2 index field in an SI form instruction. */ +#define SI_I2 (RI_I2 + 1) +#define SI_I2_MASK (0xff << 16) + { 8, 16, 0, 0, I370_OPERAND_RELATIVE, "SI I2"}, + + /* The B1 base register field in an SI form instruction. */ +#define SI_B1 (SI_I2 + 1) +#define SI_B1_MASK (0xf << 12) + { 4, 12, 0, 0, I370_OPERAND_GPR, "SI B1" }, + + /* The D1 displacement field in an SI form instruction. */ +#define SI_D1 (SI_B1 + 1) +#define SI_D1_MASK (0xfff) + { 12, 0, 0, 0, I370_OPERAND_RELATIVE, "SI D1" }, + + /* The B2 base register field in an S form instruction. */ +#define S_B2 (SI_D1 + 1) +#define S_B2_MASK (0xf << 12) + { 4, 12, 0, 0, I370_OPERAND_GPR | I370_OPERAND_BASE | I370_OPERAND_SBASE, "S B2" }, + + /* The D2 displacement field in an S form instruction. */ +#define S_D2 (S_B2 + 1) +#define S_D2_MASK (0xfff) + { 12, 0, 0, 0, I370_OPERAND_RELATIVE, "S D2" }, + + /* The L length field in an SS form instruction. */ +#define SS_L (S_D2 + 1) +#define SS_L_MASK (0xffff<<16) + { 8, 16, 0, 0, I370_OPERAND_RELATIVE | I370_OPERAND_LENGTH, "SS L" }, + + /* The B1 base register field in an SS form instruction. */ +#define SS_B1 (SS_L + 1) +#define SS_B1_MASK (0xf << 12) + { 4, 12, 0, 0, I370_OPERAND_GPR, "SS B1" }, + + /* The D1 displacement field in an SS form instruction. */ +#define SS_D1 (SS_B1 + 1) +#define SS_D1_MASK (0xfff) + { 12, 0, 0, 0, I370_OPERAND_RELATIVE, "SS D1" }, + + /* The B2 base register field in an SS form instruction. */ +#define SS_B2 (SS_D1 + 1) +#define SS_B2_MASK (0xf << 12) + { 4, 12, insert_ss_b2, extract_ss_b2, I370_OPERAND_GPR | I370_OPERAND_BASE | I370_OPERAND_SBASE, "SS B2" }, + + /* The D2 displacement field in an SS form instruction. */ +#define SS_D2 (SS_B2 + 1) +#define SS_D2_MASK (0xfff) + { 12, 0, insert_ss_d2, extract_ss_d2, I370_OPERAND_RELATIVE, "SS D2" }, + + +}; + +/* The functions used to insert and extract complicated operands. */ + +/*ARGSUSED*/ +static i370_insn_t +insert_ss_b2 (insn, value, errmsg) + i370_insn_t insn; + long value; + const char **errmsg; +{ + insn.i[1] |= (value & 0xf) << 28; + return insn; +} + +static i370_insn_t +insert_ss_d2 (insn, value, errmsg) + i370_insn_t insn; + long value; + const char **errmsg; +{ + insn.i[1] |= (value & 0xfff) << 16; + return insn; +} + +static i370_insn_t +insert_rxf_r3 (insn, value, errmsg) + i370_insn_t insn; + long value; + const char **errmsg; +{ + insn.i[1] |= (value & 0xf) << 28; + return insn; +} + +static long +extract_ss_b2 (insn, invalid) + i370_insn_t insn; + int *invalid; +{ + return (insn.i[1] >>28) & 0xf; +} + +static long +extract_ss_d2 (insn, invalid) + i370_insn_t insn; + int *invalid; +{ + return (insn.i[1] >>16) & 0xfff; +} + +static long +extract_rxf_r3 (insn, invalid) + i370_insn_t insn; + int *invalid; +{ + return (insn.i[1] >>28) & 0xf; +} + + +/* Macros used to form opcodes. */ + +/* The short-instruction opcode. */ +#define OPS(x) ((((unsigned short)(x)) & 0xff) << 8) +#define OPS_MASK OPS (0xff) + +/* the extended instruction opcode */ +#define XOPS(x) ((((unsigned short)(x)) & 0xff) << 24) +#define XOPS_MASK XOPS (0xff) + +/* the S instruction opcode */ +#define SOPS(x) ((((unsigned short)(x)) & 0xffff) << 16) +#define SOPS_MASK SOPS (0xffff) + +/* the E instruction opcode */ +#define EOPS(x) (((unsigned short)(x)) & 0xffff) +#define EOPS_MASK EOPS (0xffff) + +/* the RI instruction opcode */ +#define ROPS(x) (((((unsigned short)(x)) & 0xff0) << 20) | \ + ((((unsigned short)(x)) & 0x00f) << 16)) +#define ROPS_MASK ROPS (0xfff) + +/* --------------------------------------------------------- */ +/* An E form instruction. */ +#define E(op) (EOPS (op)) +#define E_MASK E (0xffff) + +/* An RR form instruction. */ +#define RR(op, r1, r2) \ + (OPS (op) | ((((unsigned short)(r1)) & 0xf) << 4) | \ + ((((unsigned short)(r2)) & 0xf) )) + +#define RR_MASK RR (0xff, 0x0, 0x0) + +/* An SVC-style instruction. */ +#define SVC(op, i) \ + (OPS (op) | (((unsigned short)(i)) & 0xff)) + +#define SVC_MASK SVC (0xff, 0x0) + +/* An RRE form instruction. */ +#define RRE(op, r1, r2) \ + (SOPS (op) | ((((unsigned short)(r1)) & 0xf) << 4) | \ + ((((unsigned short)(r2)) & 0xf) )) + +#define RRE_MASK RRE (0xffff, 0x0, 0x0) + +/* An RRF form instruction. */ +#define RRF(op, r3, r1, r2) \ + (SOPS (op) | ((((unsigned short)(r3)) & 0xf) << 12) | \ + ((((unsigned short)(r1)) & 0xf) << 4) | \ + ((((unsigned short)(r2)) & 0xf) )) + +#define RRF_MASK RRF (0xffff, 0x0, 0x0, 0x0) + +/* An RX form instruction. */ +#define RX(op, r1, x2, b2, d2) \ + (XOPS(op) | ((((unsigned short)(r1)) & 0xf) << 20) | \ + ((((unsigned short)(x2)) & 0xf) << 16) | \ + ((((unsigned short)(b2)) & 0xf) << 12) | \ + ((((unsigned short)(d2)) & 0xfff))) + +#define RX_MASK RX (0xff, 0x0, 0x0, 0x0, 0x0) + +/* An RXE form instruction high word. */ +#define RXEH(op, r1, x2, b2, d2) \ + (XOPS(op) | ((((unsigned short)(r1)) & 0xf) << 20) | \ + ((((unsigned short)(x2)) & 0xf) << 16) | \ + ((((unsigned short)(b2)) & 0xf) << 12) | \ + ((((unsigned short)(d2)) & 0xfff))) + +#define RXEH_MASK RXEH (0xff, 0, 0, 0, 0) + +/* An RXE form instruction low word. */ +#define RXEL(op) \ + ((((unsigned short)(op)) & 0xff) << 16 ) + +#define RXEL_MASK RXEL (0xff) + +/* An RXF form instruction high word. */ +#define RXFH(op, r1, x2, b2, d2) \ + (XOPS(op) | ((((unsigned short)(r1)) & 0xf) << 20) | \ + ((((unsigned short)(x2)) & 0xf) << 16) | \ + ((((unsigned short)(b2)) & 0xf) << 12) | \ + ((((unsigned short)(d2)) & 0xfff))) + +#define RXFH_MASK RXFH (0xff, 0, 0, 0, 0) + +/* An RXF form instruction low word. */ +#define RXFL(op, r3) \ + (((((unsigned short)(r3)) & 0xf) << 28 ) | \ + ((((unsigned short)(op)) & 0xff) << 16 )) + +#define RXFL_MASK RXFL (0xff, 0) + +/* An RS form instruction. */ +#define RS(op, r1, b3, b2, d2) \ + (XOPS(op) | ((((unsigned short)(r1)) & 0xf) << 20) | \ + ((((unsigned short)(b3)) & 0xf) << 16) | \ + ((((unsigned short)(b2)) & 0xf) << 12) | \ + ((((unsigned short)(d2)) & 0xfff))) + +#define RS_MASK RS (0xff, 0x0, 0x0, 0x0, 0x0) + +/* An RSI form instruction. */ +#define RSI(op, r1, r3, i2) \ + (XOPS(op) | ((((unsigned short)(r1)) & 0xf) << 20) | \ + ((((unsigned short)(r3)) & 0xf) << 16) | \ + ((((unsigned short)(i2)) & 0xffff))) + +#define RSI_MASK RSI (0xff, 0x0, 0x0, 0x0) + +/* An RI form instruction. */ +#define RI(op, r1, i2) \ + (ROPS(op) | ((((unsigned short)(r1)) & 0xf) << 20) | \ + ((((unsigned short)(i2)) & 0xffff))) + +#define RI_MASK RI (0xfff, 0x0, 0x0) + +/* An SI form instruction. */ +#define SI(op, i2, b1, d1) \ + (XOPS(op) | ((((unsigned short)(i2)) & 0xff) << 16) | \ + ((((unsigned short)(b1)) & 0xf) << 12) | \ + ((((unsigned short)(d1)) & 0xfff))) + +#define SI_MASK SI (0xff, 0x0, 0x0, 0x0) + +/* An S form instruction. */ +#define S(op, b2, d2) \ + (SOPS(op) | ((((unsigned short)(b2)) & 0xf) << 12) | \ + ((((unsigned short)(d2)) & 0xfff))) + +#define S_MASK S (0xffff, 0x0, 0x0) + +/* An SS form instruction high word. */ +#define SSH(op, l, b1, d1) \ + (XOPS(op) | ((((unsigned short)(l)) & 0xff) << 16) | \ + ((((unsigned short)(b1)) & 0xf) << 12) | \ + ((((unsigned short)(d1)) & 0xfff))) + +/* An SS form instruction low word. */ +#define SSL(b2, d2) \ + ( ((((unsigned short)(b1)) & 0xf) << 28) | \ + ((((unsigned short)(d1)) & 0xfff) << 16 )) + +#define SS_MASK SSH (0xff, 0x0, 0x0, 0x0) + +/* An SSE form instruction high word. */ +#define SSEH(op, b1, d1) \ + (SOPS(op) | ((((unsigned short)(b1)) & 0xf) << 12) | \ + ((((unsigned short)(d1)) & 0xfff))) + +/* An SSE form instruction low word. */ +#define SSEL(b2, d2) \ + ( ((((unsigned short)(b1)) & 0xf) << 28) | \ + ((((unsigned short)(d1)) & 0xfff) << 16 )) + +#define SSE_MASK SSEH (0xffff, 0x0, 0x0) + + +/* Smaller names for the flags so each entry in the opcodes table will + fit on a single line. These flags are set up so that e.g. IXA means + the insn is supported on the 370/XA or newer architecture. + Note that 370 or older obsolete insn's are not supported ... + */ +#define IBF I370_OPCODE_ESA390_BF +#define IBS I370_OPCODE_ESA390_BS +#define ICK I370_OPCODE_ESA390_CK +#define ICM I370_OPCODE_ESA390_CM +#define IFX I370_OPCODE_ESA390_FX +#define IHX I370_OPCODE_ESA390_HX +#define IIR I370_OPCODE_ESA390_IR +#define IMI I370_OPCODE_ESA390_MI +#define IPC I370_OPCODE_ESA390_PC +#define IPL I370_OPCODE_ESA390_PL +#define IQR I370_OPCODE_ESA390_QR +#define IRP I370_OPCODE_ESA390_RP +#define ISA I370_OPCODE_ESA390_SA +#define ISG I370_OPCODE_ESA390_SG +#define ISR I370_OPCODE_ESA390_SR +#define ITR I370_OPCODE_ESA390_SR +#define I390 IBF | IBS | ICK | ICM | IIR | IFX | IHX | IMI | IPC | IPL | IQR | IRP | ISA | ISG | ISR | ITR | I370_OPCODE_ESA390 +#define IESA I390 | I370_OPCODE_ESA370 +#define IXA IESA | I370_OPCODE_370_XA +#define I370 IXA | I370_OPCODE_370 +#define I360 I370 | I370_OPCODE_360 + + +/* The opcode table. + + The format of the opcode table is: + + NAME LEN OPCODE_HI OPCODE_LO MASK_HI MASK_LO FLAGS { OPERANDS } + + NAME is the name of the instruction. + OPCODE is the instruction opcode. + MASK is the opcode mask; this is used to tell the disassembler + which bits in the actual opcode must match OPCODE. + FLAGS are flags indicated what processors support the instruction. + OPERANDS is the list of operands. + + The disassembler reads the table in order and prints the first + instruction which matches, so this table is sorted to put more + specific instructions before more general instructions. It is also + sorted by major opcode. */ + +const struct i370_opcode i370_opcodes[] = { + +/* E form instructions */ +{ "pr", 2, {E(0x0101), 0}, {E_MASK, 0}, IESA, {0} }, + +{ "trap2", 2, {E(0x01FF), 0}, {E_MASK, 0}, ITR, {0} }, +{ "upt", 2, {E(0x0102), 0}, {E_MASK, 0}, IXA, {0} }, + +/* RR form instructions */ +{ "ar", 2, {RR(0x1a,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "adr", 2, {RR(0x2a,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "aer", 2, {RR(0x3a,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "alr", 2, {RR(0x1e,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "aur", 2, {RR(0x2e,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "awr", 2, {RR(0x3e,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "axr", 2, {RR(0x36,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "balr", 2, {RR(0x05,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "basr", 2, {RR(0x0d,0,0), 0}, {RR_MASK, 0}, IXA, {RR_R1, RR_R2} }, +{ "bassm", 2, {RR(0x0c,0,0), 0}, {RR_MASK, 0}, IXA, {RR_R1, RR_R2} }, +{ "bsm", 2, {RR(0x0b,0,0), 0}, {RR_MASK, 0}, IXA, {RR_R1, RR_R2} }, +{ "bcr", 2, {RR(0x07,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "bctr", 2, {RR(0x06,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "cdr", 2, {RR(0x29,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "cer", 2, {RR(0x39,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "clr", 2, {RR(0x15,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "clcl", 2, {RR(0x0f,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "cr", 2, {RR(0x19,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "ddr", 2, {RR(0x2d,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "der", 2, {RR(0x3d,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "dr", 2, {RR(0x1d,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "hdr", 2, {RR(0x24,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "her", 2, {RR(0x34,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lcdr", 2, {RR(0x23,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lcer", 2, {RR(0x33,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lcr", 2, {RR(0x13,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "ldr", 2, {RR(0x28,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "ler", 2, {RR(0x38,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lndr", 2, {RR(0x21,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lner", 2, {RR(0x31,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lnr", 2, {RR(0x11,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lpdr", 2, {RR(0x20,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lper", 2, {RR(0x30,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lpr", 2, {RR(0x10,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lr", 2, {RR(0x18,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lrdr", 2, {RR(0x25,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lrer", 2, {RR(0x35,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "ltdr", 2, {RR(0x22,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "lter", 2, {RR(0x32,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "ltr", 2, {RR(0x12,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "mdr", 2, {RR(0x2c,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "mer", 2, {RR(0x3c,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "mr", 2, {RR(0x1c,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "mvcl", 2, {RR(0x0e,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "mxdr", 2, {RR(0x27,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "mxr", 2, {RR(0x26,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "nr", 2, {RR(0x14,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "or", 2, {RR(0x16,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "sdr", 2, {RR(0x2b,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "ser", 2, {RR(0x3b,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "slr", 2, {RR(0x1f,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "spm", 2, {RR(0x04,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1} }, +{ "sr", 2, {RR(0x1b,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "sur", 2, {RR(0x3f,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "swr", 2, {RR(0x2f,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "sxr", 2, {RR(0x37,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, +{ "xr", 2, {RR(0x17,0,0), 0}, {RR_MASK, 0}, I370, {RR_R1, RR_R2} }, + +/* unusual RR formats */ +{ "svc", 2, {SVC(0x0a,0), 0}, {SVC_MASK, 0}, I370, {RR_I} }, + +/* RRE form instructions */ +{ "adbr", 4, {RRE(0xb31a,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "aebr", 4, {RRE(0xb30a,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "axbr", 4, {RRE(0xb34a,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "bakr", 4, {RRE(0xb240,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "bsa", 4, {RRE(0xb25a,0,0), 0}, {RRE_MASK, 0}, IBS, {RRE_R1, RRE_R2} }, +{ "bsg", 4, {RRE(0xb258,0,0), 0}, {RRE_MASK, 0}, ISG, {RRE_R1, RRE_R2} }, +{ "cdbr", 4, {RRE(0xb319,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "cdfbr", 4, {RRE(0xb395,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "cdfr", 4, {RRE(0xb3b5,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "cebr", 4, {RRE(0xb309,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "cefbr", 4, {RRE(0xb394,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "cefr", 4, {RRE(0xb3b4,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "cksm", 4, {RRE(0xb241,0,0), 0}, {RRE_MASK, 0}, ICK, {RRE_R1, RRE_R2} }, +{ "clst", 4, {RRE(0xb25d,0,0), 0}, {RRE_MASK, 0}, ISR, {RRE_R1, RRE_R2} }, +{ "cpya", 4, {RRE(0xb24d,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "cuse", 4, {RRE(0xb257,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "cxbr", 4, {RRE(0xb349,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "cxfbr", 4, {RRE(0xb396,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "cxfr", 4, {RRE(0xb3b6,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "cxr", 4, {RRE(0xb369,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "ddbr", 4, {RRE(0xb31d,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "debr", 4, {RRE(0xb30d,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "dxbr", 4, {RRE(0xb34d,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "dxr", 4, {RRE(0xb22d,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1, RRE_R2} }, +{ "ear", 4, {RRE(0xb24f,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "efpc", 4, {RRE(0xb38c,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "epar", 4, {RRE(0xb226,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1} }, +{ "ereg", 4, {RRE(0xb249,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "esar", 4, {RRE(0xb227,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1} }, +{ "esta", 4, {RRE(0xb24a,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "fidr", 4, {RRE(0xb37f,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "fier", 4, {RRE(0xb377,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "fixr", 4, {RRE(0xb367,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "iac", 4, {RRE(0xb224,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1} }, +{ "ipm", 4, {RRE(0xb222,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1} }, +{ "ipte", 4, {RRE(0xb221,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1, RRE_R2} }, +{ "iske", 4, {RRE(0xb229,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1, RRE_R2} }, +{ "ivsk", 4, {RRE(0xb223,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1, RRE_R2} }, +{ "kdbr", 4, {RRE(0xb318,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "kebr", 4, {RRE(0xb308,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "kxbr", 4, {RRE(0xb348,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lcdbr", 4, {RRE(0xb313,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lcebr", 4, {RRE(0xb303,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lcxbr", 4, {RRE(0xb343,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lcxr", 4, {RRE(0xb363,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "lder", 4, {RRE(0xb324,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "ldxbr", 4, {RRE(0xb345,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "ledbr", 4, {RRE(0xb344,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lexbr", 4, {RRE(0xb346,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lexr", 4, {RRE(0xb366,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "lndbr", 4, {RRE(0xb311,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lnebr", 4, {RRE(0xb301,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lnxbr", 4, {RRE(0xb341,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lnxr", 4, {RRE(0xb361,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "lpdbr", 4, {RRE(0xb310,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lpebr", 4, {RRE(0xb300,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lpxbr", 4, {RRE(0xb340,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "lpxr", 4, {RRE(0xb360,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "ltdbr", 4, {RRE(0xb312,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "ltebr", 4, {RRE(0xb302,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "ltxbr", 4, {RRE(0xb342,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "ltxr", 4, {RRE(0xb362,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "lura", 4, {RRE(0xb24b,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "lxdr", 4, {RRE(0xb325,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "lxer", 4, {RRE(0xb326,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "lxr", 4, {RRE(0xb365,0,0), 0}, {RRE_MASK, 0}, IFX, {RRE_R1, RRE_R2} }, +{ "lzdr", 4, {RRE(0xb375,0,0), 0}, {RRE_MASK, 0}, IFX, {RRE_R1, RRE_R2} }, +{ "lzer", 4, {RRE(0xb374,0,0), 0}, {RRE_MASK, 0}, IFX, {RRE_R1, RRE_R2} }, +{ "lzxr", 4, {RRE(0xb376,0,0), 0}, {RRE_MASK, 0}, IFX, {RRE_R1, RRE_R2} }, +{ "mdbr", 4, {RRE(0xb31c,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "mdebr", 4, {RRE(0xb30c,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "meebr", 4, {RRE(0xb317,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "meer", 4, {RRE(0xb337,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "msr", 4, {RRE(0xb252,0,0), 0}, {RRE_MASK, 0}, IIR, {RRE_R1, RRE_R2} }, +{ "msta", 4, {RRE(0xb247,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1} }, +{ "mvpg", 4, {RRE(0xb254,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "mvst", 4, {RRE(0xb255,0,0), 0}, {RRE_MASK, 0}, ISR, {RRE_R1, RRE_R2} }, +{ "mxbr", 4, {RRE(0xb34c,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "mxdbr", 4, {RRE(0xb307,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "palb", 4, {RRE(0xb248,0,0), 0}, {RRE_MASK, 0}, IESA, {0} }, +{ "prbe", 4, {RRE(0xb22a,0,0), 0}, {RRE_MASK, 0}, I370, {RRE_R1, RRE_R2} }, +{ "pt", 4, {RRE(0xb228,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1, RRE_R2} }, +{ "rrbe", 4, {RRE(0xb22a,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1, RRE_R2} }, +{ "sar", 4, {RRE(0xb24e,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "sdbr", 4, {RRE(0xb31b,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "sebr", 4, {RRE(0xb30b,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "servc", 4, {RRE(0xb220,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "sfpc", 4, {RRE(0xb384,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "sqdbr", 4, {RRE(0xb315,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "sqdr", 4, {RRE(0xb244,0,0), 0}, {RRE_MASK, 0}, IQR, {RRE_R1, RRE_R2} }, +{ "sqebr", 4, {RRE(0xb314,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "sqer", 4, {RRE(0xb245,0,0), 0}, {RRE_MASK, 0}, IQR, {RRE_R1, RRE_R2} }, +{ "sqxbr", 4, {RRE(0xb316,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "sqxr", 4, {RRE(0xb336,0,0), 0}, {RRE_MASK, 0}, IHX, {RRE_R1, RRE_R2} }, +{ "srst", 4, {RRE(0xb25e,0,0), 0}, {RRE_MASK, 0}, ISR, {RRE_R1, RRE_R2} }, +{ "ssar", 4, {RRE(0xb225,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1} }, +{ "sske", 4, {RRE(0xb22b,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1, RRE_R2} }, +{ "stura", 4, {RRE(0xb246,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "sxbr", 4, {RRE(0xb34b,0,0), 0}, {RRE_MASK, 0}, IBF, {RRE_R1, RRE_R2} }, +{ "tar", 4, {RRE(0xb24c,0,0), 0}, {RRE_MASK, 0}, IESA, {RRE_R1, RRE_R2} }, +{ "tb", 4, {RRE(0xb22c,0,0), 0}, {RRE_MASK, 0}, IXA, {RRE_R1, RRE_R2} }, +{ "thdr", 4, {RRE(0xb359,0,0), 0}, {RRE_MASK, 0}, IFX, {RRE_R1, RRE_R2} }, +{ "thder", 4, {RRE(0xb359,0,0), 0}, {RRE_MASK, 0}, IFX, {RRE_R1, RRE_R2} }, + +/* RRF form instructions */ +{ "cfdbr", 4, {RRF(0xb399,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "cfdr", 4, {RRF(0xb3b9,0,0,0), 0}, {RRF_MASK, 0}, IHX, {RRF_R1, RRF_R3, RRF_R2} }, +{ "cfebr", 4, {RRF(0xb398,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "cfer", 4, {RRF(0xb3b8,0,0,0), 0}, {RRF_MASK, 0}, IHX, {RRF_R1, RRF_R3, RRF_R2} }, +{ "cfxbr", 4, {RRF(0xb39a,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "cfxr", 4, {RRF(0xb3ba,0,0,0), 0}, {RRF_MASK, 0}, IHX, {RRF_R1, RRF_R3, RRF_R2} }, +{ "didbr", 4, {RRF(0xb35b,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "diebr", 4, {RRF(0xb353,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "fidbr", 4, {RRF(0xb35f,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "fiebr", 4, {RRF(0xb357,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "fixbr", 4, {RRF(0xb347,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "madbr", 4, {RRF(0xb31e,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "maebr", 4, {RRF(0xb30e,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "msdbr", 4, {RRF(0xb31f,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "msebr", 4, {RRF(0xb30f,0,0,0), 0}, {RRF_MASK, 0}, IBF, {RRF_R1, RRF_R3, RRF_R2} }, +{ "tbdr", 4, {RRF(0xb351,0,0,0), 0}, {RRF_MASK, 0}, IFX, {RRF_R1, RRF_R3, RRF_R2} }, +{ "tbedr", 4, {RRF(0xb350,0,0,0), 0}, {RRF_MASK, 0}, IFX, {RRF_R1, RRF_R3, RRF_R2} }, + +/* RX form instructions */ +{ "a", 4, {RX(0x5a,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ad", 4, {RX(0x6a,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ae", 4, {RX(0x7a,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ah", 4, {RX(0x4a,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "al", 4, {RX(0x5e,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "au", 4, {RX(0x7e,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "aw", 4, {RX(0x6e,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "bal", 4, {RX(0x45,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "bas", 4, {RX(0x4d,0,0,0,0), 0}, {RX_MASK, 0}, IXA, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "bc", 4, {RX(0x47,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "bct", 4, {RX(0x46,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "c", 4, {RX(0x59,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "cd", 4, {RX(0x69,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ce", 4, {RX(0x79,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ch", 4, {RX(0x49,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "cl", 4, {RX(0x55,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "cvb", 4, {RX(0x4f,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "cvd", 4, {RX(0x4e,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "d", 4, {RX(0x5d,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "dd", 4, {RX(0x6d,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "de", 4, {RX(0x7d,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ex", 4, {RX(0x44,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ic", 4, {RX(0x43,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "l", 4, {RX(0x58,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "la", 4, {RX(0x41,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "lae", 4, {RX(0x51,0,0,0,0), 0}, {RX_MASK, 0}, IESA, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ld", 4, {RX(0x68,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "le", 4, {RX(0x78,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "lh", 4, {RX(0x48,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "lra", 4, {RX(0xb1,0,0,0,0), 0}, {RX_MASK, 0}, IXA, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "m", 4, {RX(0x5c,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "md", 4, {RX(0x6c,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "me", 4, {RX(0x7c,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "mh", 4, {RX(0x4c,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ms", 4, {RX(0x71,0,0,0,0), 0}, {RX_MASK, 0}, IIR, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "mxd", 4, {RX(0x67,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "n", 4, {RX(0x54,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "o", 4, {RX(0x56,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "s", 4, {RX(0x5b,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sd", 4, {RX(0x6b,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "se", 4, {RX(0x7b,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sh", 4, {RX(0x4b,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sl", 4, {RX(0x5f,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "st", 4, {RX(0x50,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "stc", 4, {RX(0x42,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "std", 4, {RX(0x60,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ste", 4, {RX(0x70,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sth", 4, {RX(0x40,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "su", 4, {RX(0x7f,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sw", 4, {RX(0x6f,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "x", 4, {RX(0x57,0,0,0,0), 0}, {RX_MASK, 0}, I370, {RX_R1, RX_D2, RX_X2, RX_B2} }, + +/* RXE form instructions */ +{ "adb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x1a)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "aeb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x0a)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "cdb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x19)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ceb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x09)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ddb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x1d)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "deb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x0d)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "kdb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x18)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "keb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x08)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "lde", 6, {RXEH(0xed,0,0,0,0), RXEL(0x24)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "ldeb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x04)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "lxd", 6, {RXEH(0xed,0,0,0,0), RXEL(0x25)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "lxdb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x05)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "lxe", 6, {RXEH(0xed,0,0,0,0), RXEL(0x26)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "lxeb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x06)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "mdb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x1c)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "mdeb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x0c)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "mee", 6, {RXEH(0xed,0,0,0,0), RXEL(0x37)}, {RXEH_MASK, RXEL_MASK}, IHX, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "meeb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x17)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "mxdb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x07)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sqd", 6, {RXEH(0xed,0,0,0,0), RXEL(0x35)}, {RXEH_MASK, RXEL_MASK}, IHX, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sqdb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x15)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sqe", 6, {RXEH(0xed,0,0,0,0), RXEL(0x34)}, {RXEH_MASK, RXEL_MASK}, IHX, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sqeb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x14)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "sdb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x1b)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "seb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x0b)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "tcdb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x11)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "tceb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x10)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, +{ "tcxb", 6, {RXEH(0xed,0,0,0,0), RXEL(0x12)}, {RXEH_MASK, RXEL_MASK}, IBF, {RX_R1, RX_D2, RX_X2, RX_B2} }, + +/* RXF form instructions */ +{ "madb", 6, {RXFH(0xed,0,0,0,0), RXFL(0x1e,0)}, {RXFH_MASK, RXFL_MASK}, IBF, {RX_R1, RXF_R3, RX_D2, RX_X2, RX_B2} }, +{ "maeb", 6, {RXFH(0xed,0,0,0,0), RXFL(0x0e,0)}, {RXFH_MASK, RXFL_MASK}, IBF, {RX_R1, RXF_R3, RX_D2, RX_X2, RX_B2} }, +{ "msdb", 6, {RXFH(0xed,0,0,0,0), RXFL(0x1f,0)}, {RXFH_MASK, RXFL_MASK}, IBF, {RX_R1, RXF_R3, RX_D2, RX_X2, RX_B2} }, +{ "mseb", 6, {RXFH(0xed,0,0,0,0), RXFL(0x0f,0)}, {RXFH_MASK, RXFL_MASK}, IBF, {RX_R1, RXF_R3, RX_D2, RX_X2, RX_B2} }, + +/* RS form instructions */ +{ "bxh", 4, {RS(0x86,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "bxle", 4, {RS(0x87,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "cds", 4, {RS(0xbb,0,0,0,0), 0}, {RS_MASK, 0}, IXA, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "clcle", 4, {RS(0xa9,0,0,0,0), 0}, {RS_MASK, 0}, ICM, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "clm", 4, {RS(0xbd,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "cs", 4, {RS(0xba,0,0,0,0), 0}, {RS_MASK, 0}, IXA, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "icm", 4, {RS(0xbf,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "lam", 4, {RS(0x9a,0,0,0,0), 0}, {RS_MASK, 0}, IESA, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "lctl", 4, {RS(0xb7,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "lm", 4, {RS(0x98,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "mvcle", 4, {RS(0xa8,0,0,0,0), 0}, {RS_MASK, 0}, ICM, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "sigp", 4, {RS(0xae,0,0,0,0), 0}, {RS_MASK, 0}, IXA, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "stam", 4, {RS(0x9b,0,0,0,0), 0}, {RS_MASK, 0}, IESA, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "stcm", 4, {RS(0xbe,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "stctl", 4, {RS(0xb6,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "stm", 4, {RS(0x90,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_R3, RS_D2, RS_B2} }, +{ "trace", 4, {RS(0x99,0,0,0,0), 0}, {RS_MASK, 0}, IXA, {RX_R1, RS_R3, RS_D2, RS_B2} }, + +/* RS form instructions with blank R3 and optional B2 (shift left/right) */ +{ "sla", 4, {RS(0x8b,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_D2, RS_B2_OPT} }, +{ "slda", 4, {RS(0x8f,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_D2, RS_B2_OPT} }, +{ "sldl", 4, {RS(0x8d,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_D2, RS_B2_OPT} }, +{ "sll", 4, {RS(0x89,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_D2, RS_B2_OPT} }, +{ "sra", 4, {RS(0x8a,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_D2, RS_B2_OPT} }, +{ "srda", 4, {RS(0x8e,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_D2, RS_B2_OPT} }, +{ "srdl", 4, {RS(0x8c,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_D2, RS_B2_OPT} }, +{ "srl", 4, {RS(0x88,0,0,0,0), 0}, {RS_MASK, 0}, I370, {RX_R1, RS_D2, RS_B2_OPT} }, + +/* RSI form instructions */ +{ "brxh", 4, {RSI(0x84,0,0,0), 0}, {RSI_MASK, 0}, IIR, {RSI_R1, RSI_R3, RSI_I2} }, +{ "brxle", 4, {RSI(0x85,0,0,0), 0}, {RSI_MASK, 0}, IIR, {RSI_R1, RSI_R3, RSI_I2} }, + +/* RI form instructions */ +{ "ahi", 4, {RI(0xa7a,0,0), 0}, {RI_MASK, 0}, IIR, {RI_R1, RI_I2} }, +{ "bras", 4, {RI(0xa75,0,0), 0}, {RI_MASK, 0}, IIR, {RI_R1, RI_I2} }, +{ "brc", 4, {RI(0xa74,0,0), 0}, {RI_MASK, 0}, IIR, {RI_R1, RI_I2} }, +{ "brct", 4, {RI(0xa76,0,0), 0}, {RI_MASK, 0}, IIR, {RI_R1, RI_I2} }, +{ "chi", 4, {RI(0xa7e,0,0), 0}, {RI_MASK, 0}, IIR, {RI_R1, RI_I2} }, +{ "lhi", 4, {RI(0xa78,0,0), 0}, {RI_MASK, 0}, IIR, {RI_R1, RI_I2} }, +{ "mhi", 4, {RI(0xa7c,0,0), 0}, {RI_MASK, 0}, IIR, {RI_R1, RI_I2} }, +{ "tmh", 4, {RI(0xa70,0,0), 0}, {RI_MASK, 0}, IIR, {RI_R1, RI_I2} }, +{ "tml", 4, {RI(0xa71,0,0), 0}, {RI_MASK, 0}, IIR, {RI_R1, RI_I2} }, + +/* SI form instructions */ +{ "cli", 4, {SI(0x95,0,0,0), 0}, {SI_MASK, 0}, I370, {SI_D1, SI_B1, SI_I2} }, +{ "mc", 4, {SI(0xaf,0,0,0), 0}, {SI_MASK, 0}, I370, {SI_D1, SI_B1, SI_I2} }, +{ "mvi", 4, {SI(0x92,0,0,0), 0}, {SI_MASK, 0}, I370, {SI_D1, SI_B1, SI_I2} }, +{ "ni", 4, {SI(0x94,0,0,0), 0}, {SI_MASK, 0}, I370, {SI_D1, SI_B1, SI_I2} }, +{ "oi", 4, {SI(0x96,0,0,0), 0}, {SI_MASK, 0}, I370, {SI_D1, SI_B1, SI_I2} }, +{ "stnsm", 4, {SI(0xac,0,0,0), 0}, {SI_MASK, 0}, IXA, {SI_D1, SI_B1, SI_I2} }, +{ "stosm", 4, {SI(0xad,0,0,0), 0}, {SI_MASK, 0}, IXA, {SI_D1, SI_B1, SI_I2} }, +{ "tm", 4, {SI(0x91,0,0,0), 0}, {SI_MASK, 0}, I370, {SI_D1, SI_B1, SI_I2} }, +{ "xi", 4, {SI(0x97,0,0,0), 0}, {SI_MASK, 0}, I370, {SI_D1, SI_B1, SI_I2} }, + +/* S form instructions */ +{ "cfc", 4, {S(0xb21a,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "csch", 4, {S(0xb230,0,0), 0}, {S_MASK, 0}, IXA, {0} }, +{ "hsch", 4, {S(0xb231,0,0), 0}, {S_MASK, 0}, IXA, {0} }, +{ "ipk", 4, {S(0xb20b,0,0), 0}, {S_MASK, 0}, IXA, {0} }, +{ "lfpc", 4, {S(0xb29d,0,0), 0}, {S_MASK, 0}, IBF, {S_D2, S_B2} }, +{ "lpsw", 4, {S(0x8200,0,0), 0}, {S_MASK, 0}, I370, {S_D2, S_B2} }, +{ "msch", 4, {S(0xb232,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "pc", 4, {S(0xb218,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "pcf", 4, {S(0xb218,0,0), 0}, {S_MASK, 0}, IPC, {S_D2, S_B2} }, +{ "ptlb", 4, {S(0xb20d,0,0), 0}, {S_MASK, 0}, IXA, {0} }, +{ "rchp", 4, {S(0xb23b,0,0), 0}, {S_MASK, 0}, IXA, {0} }, +{ "rp", 4, {S(0xb277,0,0), 0}, {S_MASK, 0}, IRP, {0} }, +{ "rsch", 4, {S(0xb238,0,0), 0}, {S_MASK, 0}, IXA, {0} }, +{ "sac", 4, {S(0xb219,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "sacf", 4, {S(0xb279,0,0), 0}, {S_MASK, 0}, ISA, {S_D2, S_B2} }, +{ "sal", 4, {S(0xb237,0,0), 0}, {S_MASK, 0}, IXA, {0} }, +{ "schm", 4, {S(0xb23c,0,0), 0}, {S_MASK, 0}, IXA, {0} }, +{ "sck", 4, {S(0xb204,0,0), 0}, {S_MASK, 0}, I370, {S_D2, S_B2} }, +{ "sckc", 4, {S(0xb206,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "spka", 4, {S(0xb20a,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "spt", 4, {S(0xb208,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "spx", 4, {S(0xb210,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "srnm", 4, {S(0xb299,0,0), 0}, {S_MASK, 0}, IBF, {S_D2, S_B2} }, +{ "ssch", 4, {S(0xb233,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "ssm", 4, {S(0x8000,0,0), 0}, {S_MASK, 0}, I370, {S_D2, S_B2} }, +{ "stap", 4, {S(0xb212,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "stck", 4, {S(0xb205,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "stckc", 4, {S(0xb207,0,0), 0}, {S_MASK, 0}, I370, {S_D2, S_B2} }, +{ "stcps", 4, {S(0xb23a,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "stcrw", 4, {S(0xb239,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "stfpc", 4, {S(0xb29c,0,0), 0}, {S_MASK, 0}, IBF, {S_D2, S_B2} }, +{ "stidp", 4, {S(0xb202,0,0), 0}, {S_MASK, 0}, I370, {S_D2, S_B2} }, +{ "stpt", 4, {S(0xb209,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "stpx", 4, {S(0xb211,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "stsch", 4, {S(0xb234,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "tpi", 4, {S(0xb236,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, +{ "trap4", 4, {S(0xb2ff,0,0), 0}, {S_MASK, 0}, ITR, {S_D2, S_B2} }, +{ "ts", 4, {S(0x9300,0,0), 0}, {S_MASK, 0}, I370, {S_D2, S_B2} }, +{ "tsch", 4, {S(0xb235,0,0), 0}, {S_MASK, 0}, IXA, {S_D2, S_B2} }, + +/* SS form instructions */ +{ "ap", 6, {SSH(0xfa,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "clc", 6, {SSH(0xd5,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "cp", 6, {SSH(0xf9,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "dp", 6, {SSH(0xfd,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "ed", 6, {SSH(0xde,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "edmk", 6, {SSH(0xdf,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "mvc", 6, {SSH(0xd2,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "mvcin", 6, {SSH(0xe8,0,0,0), 0}, {SS_MASK, 0}, IMI, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "mvck", 6, {SSH(0xd9,0,0,0), 0}, {SS_MASK, 0}, IXA, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "mvcp", 6, {SSH(0xda,0,0,0), 0}, {SS_MASK, 0}, IXA, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "mvcs", 6, {SSH(0xdb,0,0,0), 0}, {SS_MASK, 0}, IXA, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "mvn", 6, {SSH(0xd1,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "mvo", 6, {SSH(0xf1,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "mvz", 6, {SSH(0xd3,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "nc", 6, {SSH(0xd4,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "oc", 6, {SSH(0xd6,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "pack", 6, {SSH(0xf2,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "plo", 6, {SSH(0xee,0,0,0), 0}, {SS_MASK, 0}, IPL, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "sp", 6, {SSH(0xfb,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "srp", 6, {SSH(0xf0,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "tr", 6, {SSH(0xdc,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "trt", 6, {SSH(0xdd,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "unpk", 6, {SSH(0xf3,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "xc", 6, {SSH(0xd7,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, +{ "zap", 6, {SSH(0xf8,0,0,0), 0}, {SS_MASK, 0}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, + +/* SSE form instructions */ +{ "lasp", 6, {SSEH(0xe500,0,0), 0}, {SSE_MASK, 0}, IXA, {SS_D1, SS_B1, SS_D2, SS_B2} }, +{ "mvcdk", 6, {SSEH(0xe50f,0,0), 0}, {SSE_MASK, 0}, IESA, {SS_D1, SS_B1, SS_D2, SS_B2} }, +{ "mvcsk", 6, {SSEH(0xe50e,0,0), 0}, {SSE_MASK, 0}, IESA, {SS_D1, SS_B1, SS_D2, SS_B2} }, +{ "tprot", 6, {SSEH(0xe501,0,0), 0}, {SSE_MASK, 0}, IXA, {SS_D1, SS_B1, SS_D2, SS_B2} }, + +/* */ +}; + +const int i370_num_opcodes = + sizeof (i370_opcodes) / sizeof (i370_opcodes[0]); + +/* The macro table. This is only used by the assembler. */ + +const struct i370_macro i370_macros[] = { +{ "b", 1, I370, "bc 15,%0" }, +{ "br", 1, I370, "bcr 15,%0" }, + +{ "nop", 1, I370, "bc 0,%0" }, +{ "nopr", 1, I370, "bcr 0,%0" }, + +{ "bh", 1, I370, "bc 2,%0" }, +{ "bhr", 1, I370, "bcr 2,%0" }, +{ "bl", 1, I370, "bc 4,%0" }, +{ "blr", 1, I370, "bcr 4,%0" }, +{ "be", 1, I370, "bc 8,%0" }, +{ "ber", 1, I370, "bcr 8,%0" }, + +{ "bnh", 1, I370, "bc 13,%0" }, +{ "bnhr", 1, I370, "bcr 13,%0" }, +{ "bnl", 1, I370, "bc 11,%0" }, +{ "bnlr", 1, I370, "bcr 11,%0" }, +{ "bne", 1, I370, "bc 7,%0" }, +{ "bner", 1, I370, "bcr 7,%0" }, + +{ "bp", 1, I370, "bc 2,%0" }, +{ "bpr", 1, I370, "bcr 2,%0" }, +{ "bm", 1, I370, "bc 4,%0" }, +{ "bmr", 1, I370, "bcr 4,%0" }, +{ "bz", 1, I370, "bc 8,%0" }, +{ "bzr", 1, I370, "bcr 8,%0" }, +{ "bo", 1, I370, "bc 1,%0" }, +{ "bor", 1, I370, "bcr 1,%0" }, + +{ "bnp", 1, I370, "bc 13,%0" }, +{ "bnpr", 1, I370, "bcr 13,%0" }, +{ "bnm", 1, I370, "bc 11,%0" }, +{ "bnmr", 1, I370, "bcr 11,%0" }, +{ "bnz", 1, I370, "bc 7,%0" }, +{ "bnzr", 1, I370, "bcr 7,%0" }, +{ "bno", 1, I370, "bc 14,%0" }, +{ "bnor", 1, I370, "bcr 14,%0" }, + +{ "sync", 0, I370, "bcr 15,0" }, + +}; + +const int i370_num_macros = + sizeof (i370_macros) / sizeof (i370_macros[0]); |