From dc32364075a4bf20d80cbea76743c51ba0b98482 Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Sat, 8 Dec 2001 03:46:03 +0000 Subject: [PATCH] Index: bfd/ChangeLog 2001-12-07 Geoffrey Keating Richard Henderson Corinna Vinschen * Makefile.am: Add support for xstormy16. * archures.c: Add support for xstormy16. * config.bfd: Add support for xstormy16. * configure.in: Add support for xstormy16. * reloc.c: Add support for xstormy16. * targets.c: Add support for xstormy16. * cpu-xstormy16.c: New file. * elf32-xstormy16.c: New file. * Makefile.in: Regenerated. * bfd-in2.h: Regenerated. * configure: Regenerated. * libbfd.h: Regenerated. Index: binutils/ChangeLog 2001-12-07 Geoffrey Keating * readelf.c (guess_is_rela): Add support for stormy16. (dump_relocations): Likewise. (get_machine_name): Likewise. Index: gas/ChangeLog 2001-12-07 Geoffrey Keating Richard Henderson * configure.in: Add support for xstormy16. * configure: Regenerated. * Makefile.am: Add support for xstormy16. * Makefile.in: Regenerated. * config/tc-xstormy16.c: New file. * config/tc-xstormy16.h: New file. Index: gas/testsuite/ChangeLog 2001-12-07 Geoffrey Keating matthew green * gas/xstormy16/allinsn.d: New file. * gas/xstormy16/allinsn.exp: New file. * gas/xstormy16/allinsn.s: New file. * gas/xstormy16/allinsn.sh: New file. * gas/xstormy16/gcc.d: New file. * gas/xstormy16/gcc.s: New file. * gas/xstormy16/gcc.sh: New file. * gas/xstormy16/reloc-1.d: New file. * gas/xstormy16/reloc-1.s: New file. * gas/xstormy16/reloc-2.d: New file. * gas/xstormy16/reloc-2.s: New file. Index: ld/ChangeLog 2001-12-07 Geoffrey Keating Richard Henderson * Makefile.am: Add support for xstormy16. * configure.tgt: Add support for xstormy16. * Makefile.in: Regenerate. * emulparams/elf32xstormy16.sh: New file. * scripttempl/xstormy16.sc: New file. Index: opcodes/ChangeLog 2001-12-07 Geoffrey Keating * Makefile.am: Add support for xstormy16. * Makefile.in: Regenerate. * configure.in: Add support for xstormy16. * configure: Regenerate. * disassemble.c: Add support for xstormy16. * xstormy16-asm.c: New generated file. * xstormy16-desc.c: New generated file. * xstormy16-desc.h: New generated file. * xstormy16-dis.c: New generated file. * xstormy16-ibld.c: New generated file. * xstormy16-opc.c: New generated file. * xstormy16-opc.h: New generated file. Index: include/ChangeLog 2001-12-07 Geoffrey Keating * dis-asm.h (print_insn_xstormy16): Declare. Index: include/elf/ChangeLog 2001-12-07 Geoffrey Keating Richard Henderson * common.h (EM_XSTORMY16): Define. * xstormy16.h: New file. --- bfd/ChangeLog | 17 + bfd/Makefile.am | 9 + bfd/Makefile.in | 9 + bfd/archures.c | 4 + bfd/bfd-in2.h | 7 + bfd/config.bfd | 4 + bfd/configure | 540 ++++++------ bfd/configure.in | 1 + bfd/cpu-xstormy16.c | 38 + bfd/doc/Makefile.in | 6 +- bfd/elf32-xstormy16.c | 1074 ++++++++++++++++++++++++ bfd/libbfd.h | 3 + bfd/reloc.c | 9 + bfd/targets.c | 2 + binutils/ChangeLog | 6 + binutils/readelf.c | 7 + gas/ChangeLog | 10 + gas/Makefile.am | 3 + gas/Makefile.in | 9 +- gas/config/tc-xstormy16.c | 650 ++++++++++++++ gas/config/tc-xstormy16.h | 69 ++ gas/configure | 496 +++++------ gas/configure.in | 10 +- gas/doc/Makefile.in | 7 +- gas/testsuite/ChangeLog | 18 + gas/testsuite/gas/xstormy16/allinsn.d | 1222 +++++++++++++++++++++++++++ gas/testsuite/gas/xstormy16/allinsn.exp | 8 + gas/testsuite/gas/xstormy16/allinsn.s | 1346 +++++++++++++++++++++++++++++ gas/testsuite/gas/xstormy16/allinsn.sh | 1389 ++++++++++++++++++++++++++++++ gas/testsuite/gas/xstormy16/gcc.d | 15 + gas/testsuite/gas/xstormy16/gcc.s | 4 + gas/testsuite/gas/xstormy16/gcc.sh | 45 + gas/testsuite/gas/xstormy16/reloc-1.d | 26 + gas/testsuite/gas/xstormy16/reloc-1.s | 20 + gas/testsuite/gas/xstormy16/reloc-2.d | 56 ++ gas/testsuite/gas/xstormy16/reloc-2.s | 48 ++ include/ChangeLog | 4 + include/dis-asm.h | 1 + include/elf/ChangeLog | 6 + include/elf/common.h | 2 + include/elf/xstormy16.h | 53 ++ ld/ChangeLog | 9 + ld/Makefile.am | 5 + ld/Makefile.in | 5 + ld/configure.tgt | 1 + ld/emulparams/elf32xstormy16.sh | 13 + ld/scripttempl/xstormy16.sc | 238 ++++++ opcodes/ChangeLog | 15 + opcodes/Makefile.am | 19 + opcodes/Makefile.in | 25 +- opcodes/configure | 373 ++++---- opcodes/configure.in | 1 + opcodes/disassemble.c | 6 + opcodes/xstormy16-asm.c | 659 +++++++++++++++ opcodes/xstormy16-desc.c | 1399 +++++++++++++++++++++++++++++++ opcodes/xstormy16-desc.h | 289 +++++++ opcodes/xstormy16-dis.c | 565 +++++++++++++ opcodes/xstormy16-ibld.c | 1246 +++++++++++++++++++++++++++ opcodes/xstormy16-opc.c | 1171 ++++++++++++++++++++++++++ opcodes/xstormy16-opc.h | 136 +++ 60 files changed, 12717 insertions(+), 711 deletions(-) create mode 100644 bfd/cpu-xstormy16.c create mode 100644 bfd/elf32-xstormy16.c create mode 100644 gas/config/tc-xstormy16.c create mode 100644 gas/config/tc-xstormy16.h create mode 100644 gas/testsuite/gas/xstormy16/allinsn.d create mode 100644 gas/testsuite/gas/xstormy16/allinsn.exp create mode 100644 gas/testsuite/gas/xstormy16/allinsn.s create mode 100644 gas/testsuite/gas/xstormy16/allinsn.sh create mode 100644 gas/testsuite/gas/xstormy16/gcc.d create mode 100644 gas/testsuite/gas/xstormy16/gcc.s create mode 100644 gas/testsuite/gas/xstormy16/gcc.sh create mode 100644 gas/testsuite/gas/xstormy16/reloc-1.d create mode 100644 gas/testsuite/gas/xstormy16/reloc-1.s create mode 100644 gas/testsuite/gas/xstormy16/reloc-2.d create mode 100644 gas/testsuite/gas/xstormy16/reloc-2.s create mode 100644 include/elf/xstormy16.h create mode 100644 ld/emulparams/elf32xstormy16.sh create mode 100644 ld/scripttempl/xstormy16.sc create mode 100644 opcodes/xstormy16-asm.c create mode 100644 opcodes/xstormy16-desc.c create mode 100644 opcodes/xstormy16-desc.h create mode 100644 opcodes/xstormy16-dis.c create mode 100644 opcodes/xstormy16-ibld.c create mode 100644 opcodes/xstormy16-opc.c create mode 100644 opcodes/xstormy16-opc.h diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b33956831..de0585462 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,20 @@ +2001-12-07 Geoffrey Keating + Richard Henderson + Corinna Vinschen + + * Makefile.am: Add support for xstormy16. + * archures.c: Add support for xstormy16. + * config.bfd: Add support for xstormy16. + * configure.in: Add support for xstormy16. + * reloc.c: Add support for xstormy16. + * targets.c: Add support for xstormy16. + * cpu-xstormy16.c: New file. + * elf32-xstormy16.c: New file. + * Makefile.in: Regenerated. + * bfd-in2.h: Regenerated. + * configure: Regenerated. + * libbfd.h: Regenerated. + 2001-12-07 Nick Clifton * elf.c (assign_file_positions_for_segments): Combine sentance diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 62ba358bc..ff58585ff 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -89,6 +89,7 @@ ALL_MACHINES = \ cpu-vax.lo \ cpu-we32k.lo \ cpu-w65.lo \ + cpu-xstormy16.lo \ cpu-z8k.lo ALL_MACHINES_CFILES = \ @@ -135,6 +136,7 @@ ALL_MACHINES_CFILES = \ cpu-vax.c \ cpu-we32k.c \ cpu-w65.c \ + cpu-xstormy16.c \ cpu-z8k.c # The .o files needed by all of the 32 bit vectors that are configured into @@ -217,6 +219,7 @@ BFD32_BACKENDS = \ elf32-sh-lin.lo \ elf32-sparc.lo \ elf32-v850.lo \ + elf32-xstormy16.lo \ elf32.lo \ elflink.lo \ elf-strtab.lo \ @@ -358,6 +361,7 @@ BFD32_BACKENDS_CFILES = \ elf32-sh-lin.c \ elf32-sparc.c \ elf32-v850.c \ + elf32-xstormy16.c \ elf32.c \ elflink.c \ elf-strtab.c \ @@ -857,6 +861,7 @@ cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h +cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \ @@ -1132,6 +1137,10 @@ elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/libiberty.h elf32-target.h +elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/elf/xstormy16.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \ diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 584b27b3a..e0ff2be42 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -215,6 +215,7 @@ ALL_MACHINES = \ cpu-vax.lo \ cpu-we32k.lo \ cpu-w65.lo \ + cpu-xstormy16.lo \ cpu-z8k.lo @@ -262,6 +263,7 @@ ALL_MACHINES_CFILES = \ cpu-vax.c \ cpu-we32k.c \ cpu-w65.c \ + cpu-xstormy16.c \ cpu-z8k.c @@ -345,6 +347,7 @@ BFD32_BACKENDS = \ elf32-sh-lin.lo \ elf32-sparc.lo \ elf32-v850.lo \ + elf32-xstormy16.lo \ elf32.lo \ elflink.lo \ elf-strtab.lo \ @@ -487,6 +490,7 @@ BFD32_BACKENDS_CFILES = \ elf32-sh-lin.c \ elf32-sparc.c \ elf32-v850.c \ + elf32-xstormy16.c \ elf32.c \ elflink.c \ elf-strtab.c \ @@ -1401,6 +1405,7 @@ cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h +cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \ @@ -1676,6 +1681,10 @@ elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/libiberty.h elf32-target.h +elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/elf/xstormy16.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \ diff --git a/bfd/archures.c b/bfd/archures.c index 74d44249b..19d862ed7 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -259,6 +259,8 @@ DESCRIPTION .#define bfd_mach_s390_esame 1 . bfd_arch_openrisc, {* OpenRISC *} . bfd_arch_mmix, {* Donald Knuth's educational processor *} +. bfd_arch_xstormy16, +.#define bfd_mach_xstormy16 0 . bfd_arch_last . }; */ @@ -338,6 +340,7 @@ extern const bfd_arch_info_type bfd_ia64_arch; extern const bfd_arch_info_type bfd_s390_arch; extern const bfd_arch_info_type bfd_openrisc_arch; extern const bfd_arch_info_type bfd_mmix_arch; +extern const bfd_arch_info_type bfd_xstormy16_arch; static const bfd_arch_info_type * const bfd_archures_list[] = { #ifdef SELECT_ARCHITECTURES @@ -386,6 +389,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = { &bfd_s390_arch, &bfd_openrisc_arch, &bfd_mmix_arch, + &bfd_xstormy16_arch, #endif 0 }; diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 12fe5a9ce..091042f02 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1612,6 +1612,8 @@ enum bfd_architecture #define bfd_mach_s390_esame 1 bfd_arch_openrisc, /* OpenRISC */ bfd_arch_mmix, /* Donald Knuth's educational processor */ + bfd_arch_xstormy16, +#define bfd_mach_xstormy16 0 bfd_arch_last }; @@ -2919,6 +2921,11 @@ This is the 3 bits of a value. */ BFD_RELOC_H8_DIR24A8, BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16, + +/* Sony Xstormy16 Relocations. */ + BFD_RELOC_XSTORMY16_REL_12, + BFD_RELOC_XSTORMY16_24, + BFD_RELOC_XSTORMY16_FPTR16, BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; reloc_howto_type * diff --git a/bfd/config.bfd b/bfd/config.bfd index 62ddd75c7..56bdd1cec 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -972,6 +972,10 @@ case "${targ}" in targ_defvec=w65_vec ;; + xstormy16-*-elf) + targ_defvec=bfd_elf32_xstormy16_vec + ;; + z8k*-*-*) targ_defvec=z8kcoff_vec targ_underscore=yes diff --git a/bfd/configure b/bfd/configure index 5f22ded29..0ee8912ec 100755 --- a/bfd/configure +++ b/bfd/configure @@ -57,6 +57,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -171,6 +172,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -341,6 +343,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -506,12 +513,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -550,12 +561,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:554: checking for Cygwin environment" >&5 +echo "configure:565: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -583,19 +594,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:587: checking for mingw32 environment" >&5 +echo "configure:598: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -660,7 +671,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:664: checking host system type" >&5 +echo "configure:675: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -681,7 +692,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:685: checking target system type" >&5 +echo "configure:696: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -699,7 +710,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:703: checking build system type" >&5 +echo "configure:714: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -724,7 +735,7 @@ 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:728: checking for $ac_word" >&5 +echo "configure:739: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -754,7 +765,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:758: checking for $ac_word" >&5 +echo "configure:769: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -805,7 +816,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:809: checking for $ac_word" >&5 +echo "configure:820: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -837,7 +848,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -848,12 +859,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 852 "configure" +#line 863 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:868: \"$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 @@ -879,12 +890,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:883: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:894: checking whether the C compiler ($CC $CFLAGS $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:888: checking whether we are using GNU C" >&5 +echo "configure:899: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -893,7 +904,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:897: \"$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:908: \"$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 @@ -912,7 +923,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:916: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:927: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -944,7 +955,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:948: checking for POSIXized ISC" >&5 +echo "configure:959: 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 @@ -977,7 +988,7 @@ 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:981: checking for a BSD compatible install" >&5 +echo "configure:992: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1030,7 +1041,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:1034: checking whether build environment is sane" >&5 +echo "configure:1045: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1087,7 +1098,7 @@ test "$program_suffix" != NONE && 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:1091: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1102: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -1133,7 +1144,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1137: checking for working aclocal" >&5 +echo "configure:1148: 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. @@ -1146,7 +1157,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1150: checking for working autoconf" >&5 +echo "configure:1161: 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. @@ -1159,7 +1170,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1163: checking for working automake" >&5 +echo "configure:1174: 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. @@ -1172,7 +1183,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1176: checking for working autoheader" >&5 +echo "configure:1187: 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. @@ -1185,7 +1196,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1189: checking for working makeinfo" >&5 +echo "configure:1200: 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. @@ -1221,7 +1232,7 @@ 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:1225: checking for $ac_word" >&5 +echo "configure:1236: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1253,7 +1264,7 @@ 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:1257: checking for $ac_word" >&5 +echo "configure:1268: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1285,7 +1296,7 @@ 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:1289: checking for $ac_word" >&5 +echo "configure:1300: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1400,7 +1411,7 @@ ac_prog=ld if test "$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:1404: checking for ld used by GCC" >&5 +echo "configure:1415: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1430,10 +1441,10 @@ echo "configure:1404: 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:1434: checking for GNU ld" >&5 +echo "configure:1445: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1437: checking for non-GNU ld" >&5 +echo "configure:1448: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1468,7 +1479,7 @@ else 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:1472: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1483: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1485,7 +1496,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1489: checking for $LD option to reload object files" >&5 +echo "configure:1500: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1497,7 +1508,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1501: checking for BSD-compatible nm" >&5 +echo "configure:1512: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1535,7 +1546,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1539: checking whether ln -s works" >&5 +echo "configure:1550: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1556,7 +1567,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1560: checking how to recognise dependant libraries" >&5 +echo "configure:1571: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1720,13 +1731,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1724: checking for object suffix" >&5 +echo "configure:1735: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1746,7 +1757,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1750: checking for executable suffix" >&5 +echo "configure:1761: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1756,10 +1767,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1783,7 +1794,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1787: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1798: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1845,7 +1856,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1849: checking for file" >&5 +echo "configure:1860: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1916,7 +1927,7 @@ esac # 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:1920: checking for $ac_word" >&5 +echo "configure:1931: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1948,7 +1959,7 @@ 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:1952: checking for $ac_word" >&5 +echo "configure:1963: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1983,7 +1994,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1987: checking for $ac_word" >&5 +echo "configure:1998: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2015,7 +2026,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2019: checking for $ac_word" >&5 +echo "configure:2030: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2082,8 +2093,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2086 "configure"' > conftest.$ac_ext - if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2097 "configure"' > conftest.$ac_ext + if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2104,7 +2115,7 @@ 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:2108: checking whether the C compiler needs -belf" >&5 +echo "configure:2119: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2117,14 +2128,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2139: \"$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 @@ -2314,7 +2325,7 @@ if test -z "$target" ; then fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2318: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2329: 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" @@ -2339,7 +2350,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2343: checking for executable suffix" >&5 +echo "configure:2354: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2349,10 +2360,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2379,7 +2390,7 @@ bfd_default_target_size=32 # 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:2383: checking for $ac_word" >&5 +echo "configure:2394: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2409,7 +2420,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:2413: checking for $ac_word" >&5 +echo "configure:2424: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2460,7 +2471,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:2464: checking for $ac_word" >&5 +echo "configure:2475: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2492,7 +2503,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2496: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2507: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2503,12 +2514,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2507 "configure" +#line 2518 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2523: \"$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 @@ -2534,12 +2545,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2538: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2549: checking whether the C compiler ($CC $CFLAGS $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:2543: checking whether we are using GNU C" >&5 +echo "configure:2554: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2548,7 +2559,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2552: \"$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:2563: \"$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 @@ -2567,7 +2578,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:2571: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2582: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2601,7 +2612,7 @@ fi ALL_LINGUAS="fr tr" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2605: checking how to run the C preprocessor" >&5 +echo "configure:2616: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2616,13 +2627,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2637: \"$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 : @@ -2633,13 +2644,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2654: \"$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 : @@ -2650,13 +2661,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2671: \"$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 : @@ -2683,7 +2694,7 @@ echo "$ac_t""$CPP" 1>&6 # 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:2687: checking for $ac_word" >&5 +echo "configure:2698: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2711,12 +2722,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2715: checking for ANSI C header files" >&5 +echo "configure:2726: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2724,7 +2735,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2739: \"$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* @@ -2741,7 +2752,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 @@ -2759,7 +2770,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 @@ -2780,7 +2791,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2791,7 +2802,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2815,12 +2826,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2819: checking for working const" >&5 +echo "configure:2830: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2890,21 +2901,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2894: checking for inline" >&5 +echo "configure:2905: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2930,12 +2941,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2934: checking for off_t" >&5 +echo "configure:2945: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2963,12 +2974,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2967: checking for size_t" >&5 +echo "configure:2978: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2998,19 +3009,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:3002: checking for working alloca.h" >&5 +echo "configure:3013: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3025: \"$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 @@ -3031,12 +3042,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3035: checking for alloca" >&5 +echo "configure:3046: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3079: \"$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 @@ -3096,12 +3107,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3100: checking whether alloca needs Cray hooks" >&5 +echo "configure:3111: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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:3130: checking for $ac_func" >&5 +echo "configure:3141: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3169: \"$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 @@ -3181,7 +3192,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3185: checking stack direction for C alloca" >&5 +echo "configure:3196: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3189,7 +3200,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3223: \"$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 @@ -3233,17 +3244,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:3237: checking for $ac_hdr" >&5 +echo "configure:3248: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3258: \"$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* @@ -3272,12 +3283,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3276: checking for $ac_func" >&5 +echo "configure:3287: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3315: \"$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 @@ -3325,7 +3336,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3329: checking for working mmap" >&5 +echo "configure:3340: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3333,7 +3344,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3488: \"$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 @@ -3501,17 +3512,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:3505: checking for $ac_hdr" >&5 +echo "configure:3516: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3526: \"$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* @@ -3541,12 +3552,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3545: checking for $ac_func" >&5 +echo "configure:3556: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3584: \"$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 @@ -3598,12 +3609,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3602: checking for $ac_func" >&5 +echo "configure:3613: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3641: \"$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 @@ -3660,19 +3671,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3664: checking for LC_MESSAGES" >&5 +echo "configure:3675: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3687: \"$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 @@ -3693,7 +3704,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3697: checking whether NLS is requested" >&5 +echo "configure:3708: 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" @@ -3713,7 +3724,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3717: checking whether included gettext is requested" >&5 +echo "configure:3728: 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" @@ -3732,17 +3743,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3736: checking for libintl.h" >&5 +echo "configure:3747: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3757: \"$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* @@ -3759,19 +3770,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:3763: checking for gettext in libc" >&5 +echo "configure:3774: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3786: \"$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 @@ -3787,7 +3798,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:3791: checking for bindtextdomain in -lintl" >&5 +echo "configure:3802: 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 $ac_n "(cached) $ac_c" 1>&6 @@ -3795,7 +3806,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3821: \"$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 @@ -3822,19 +3833,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:3826: checking for gettext in libintl" >&5 +echo "configure:3837: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3849: \"$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 @@ -3862,7 +3873,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:3866: checking for $ac_word" >&5 +echo "configure:3877: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3896,12 +3907,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3900: checking for $ac_func" >&5 +echo "configure:3911: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3939: \"$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 @@ -3951,7 +3962,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:3955: checking for $ac_word" >&5 +echo "configure:3966: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3987,7 +3998,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:3991: checking for $ac_word" >&5 +echo "configure:4002: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4019,7 +4030,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4059,7 +4070,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:4063: checking for $ac_word" >&5 +echo "configure:4074: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4093,7 +4104,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:4097: checking for $ac_word" >&5 +echo "configure:4108: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4129,7 +4140,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:4133: checking for $ac_word" >&5 +echo "configure:4144: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4219,7 +4230,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4223: checking for catalogs to be installed" >&5 +echo "configure:4234: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4247,17 +4258,17 @@ echo "configure:4223: 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:4251: checking for linux/version.h" >&5 +echo "configure:4262: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4272: \"$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* @@ -4335,7 +4346,7 @@ 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:4339: checking for a BSD compatible install" >&5 +echo "configure:4350: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4418,7 +4429,7 @@ 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:4422: checking for build system executable suffix" >&5 +echo "configure:4433: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4446,17 +4457,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:4450: checking for $ac_hdr" >&5 +echo "configure:4461: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4471: \"$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* @@ -4486,17 +4497,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:4490: checking for $ac_hdr" >&5 +echo "configure:4501: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4511: \"$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* @@ -4523,12 +4534,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4527: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4538: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4537,7 +4548,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4562,12 +4573,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:4566: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4577: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4575,7 +4586,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4600,7 +4611,7 @@ 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:4604: checking for opendir in -ldir" >&5 +echo "configure:4615: 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 $ac_n "(cached) $ac_c" 1>&6 @@ -4608,7 +4619,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4634: \"$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 @@ -4641,7 +4652,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4645: checking for opendir in -lx" >&5 +echo "configure:4656: 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 $ac_n "(cached) $ac_c" 1>&6 @@ -4649,7 +4660,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4675: \"$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 @@ -4685,12 +4696,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:4689: checking for $ac_func" >&5 +echo "configure:4700: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4728: \"$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 @@ -4748,12 +4759,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4752: checking whether strstr must be declared" >&5 +echo "configure:4763: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4774,7 +4785,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4795,12 +4806,12 @@ EOF fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:4799: checking whether malloc must be declared" >&5 +echo "configure:4810: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4821,7 +4832,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -4842,12 +4853,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:4846: checking whether realloc must be declared" >&5 +echo "configure:4857: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4868,7 +4879,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -4889,12 +4900,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4893: checking whether free must be declared" >&5 +echo "configure:4904: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4915,7 +4926,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4936,12 +4947,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4940: checking whether getenv must be declared" >&5 +echo "configure:4951: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4962,7 +4973,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -5185,17 +5196,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:5189: checking for $ac_hdr" >&5 +echo "configure:5200: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5210: \"$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* @@ -5223,12 +5234,12 @@ 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:5227: checking for prstatus_t in sys/procfs.h" >&5 +echo "configure:5238: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5259,12 +5270,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5263: checking for prstatus32_t in sys/procfs.h" >&5 +echo "configure:5274: checking for prstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus32_t=yes else @@ -5295,12 +5306,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5299: checking for prstatus_t.pr_who in sys/procfs.h" >&5 +echo "configure:5310: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5324: \"$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 @@ -5331,12 +5342,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5335: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 +echo "configure:5346: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes else @@ -5367,12 +5378,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5371: checking for pstatus_t in sys/procfs.h" >&5 +echo "configure:5382: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5403,12 +5414,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5407: checking for pxstatus_t in sys/procfs.h" >&5 +echo "configure:5418: checking for pxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pxstatus_t=yes else @@ -5439,12 +5450,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6 echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5443: checking for pstatus32_t in sys/procfs.h" >&5 +echo "configure:5454: checking for pstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus32_t=yes else @@ -5475,12 +5486,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5479: checking for prpsinfo_t in sys/procfs.h" >&5 +echo "configure:5490: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5511,12 +5522,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5515: checking for prpsinfo32_t in sys/procfs.h" >&5 +echo "configure:5526: checking for prpsinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes else @@ -5547,12 +5558,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5551: checking for psinfo_t in sys/procfs.h" >&5 +echo "configure:5562: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5583,12 +5594,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5587: checking for psinfo32_t in sys/procfs.h" >&5 +echo "configure:5598: checking for psinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo32_t=yes else @@ -5619,12 +5630,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5623: checking for lwpstatus_t in sys/procfs.h" >&5 +echo "configure:5634: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5655,12 +5666,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5659: checking for lwpxstatus_t in sys/procfs.h" >&5 +echo "configure:5670: checking for lwpxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes else @@ -5691,12 +5702,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5695: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 +echo "configure:5706: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5720: \"$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 @@ -5727,12 +5738,12 @@ 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:5731: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 +echo "configure:5742: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5756: \"$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 @@ -5763,12 +5774,12 @@ 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:5767: checking for win32_pstatus_t in sys/procfs.h" >&5 +echo "configure:5778: 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 $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -5990,6 +6001,7 @@ do bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; + bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; @@ -6200,17 +6212,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:6204: checking for $ac_hdr" >&5 +echo "configure:6216: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6226: \"$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* @@ -6239,12 +6251,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6243: checking for $ac_func" >&5 +echo "configure:6255: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6283: \"$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 @@ -6292,7 +6304,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6296: checking for working mmap" >&5 +echo "configure:6308: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6300,7 +6312,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6456: \"$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 @@ -6465,12 +6477,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6469: checking for $ac_func" >&5 +echo "configure:6481: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6509: \"$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 diff --git a/bfd/configure.in b/bfd/configure.in index 19242fd12..32740583b 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -583,6 +583,7 @@ do bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; + bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; diff --git a/bfd/cpu-xstormy16.c b/bfd/cpu-xstormy16.c new file mode 100644 index 000000000..827e16b79 --- /dev/null +++ b/bfd/cpu-xstormy16.c @@ -0,0 +1,38 @@ +/* BFD support for the XSTORMY16 processor. + Copyright (C) 2001 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. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" + +const bfd_arch_info_type bfd_xstormy16_arch = +{ + 16, /* bits per word */ + 32, /* bits per address */ + 8, /* bits per byte */ + bfd_arch_xstormy16, /* architecture */ + bfd_mach_xstormy16, /* machine */ + "xstormy16", /* architecture name */ + "xstormy16", /* printable name */ + 2, /* section align power */ + true, /* the default ? */ + bfd_default_compatible, /* architecture comparison fn */ + bfd_default_scan, /* string to architecture convert fn */ + NULL /* next in list */ +}; diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in index 10e9893ac..dc85d4b2a 100644 --- a/bfd/doc/Makefile.in +++ b/bfd/doc/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am +# Makefile.in generated automatically by automake 1.4 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -327,7 +327,7 @@ uninstall-info: else ii=; fi; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ - test -z "$$ii" \ + test -z "$ii" \ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done @$(NORMAL_UNINSTALL) diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c new file mode 100644 index 000000000..5be799e95 --- /dev/null +++ b/bfd/elf32-xstormy16.c @@ -0,0 +1,1074 @@ +/* XSTORMY16-specific support for 32-bit ELF. + Copyright (C) 2000, 2001 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. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" +#include "elf-bfd.h" +#include "elf/xstormy16.h" + +/* Forward declarations. */ +static reloc_howto_type * xstormy16_reloc_type_lookup + PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); +static void xstormy16_info_to_howto_rela + PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *)); +static bfd_reloc_status_type xstormy16_elf_24_reloc + PARAMS ((bfd *abfd, arelent *reloc_entry, asymbol *symbol, + PTR data, asection *input_section, bfd *output_bfd, + char **error_message)); +static boolean xstormy16_elf_check_relocs + PARAMS ((bfd *, struct bfd_link_info *, asection *, + const Elf_Internal_Rela *)); +static boolean xstormy16_relax_plt_check + PARAMS ((struct elf_link_hash_entry *, PTR)); +static boolean xstormy16_relax_plt_realloc + PARAMS ((struct elf_link_hash_entry *, PTR)); +static boolean xstormy16_elf_relax_section + PARAMS ((bfd *abfd, asection *sec, struct bfd_link_info *link_info, + boolean *again)); +static boolean xstormy16_elf_always_size_sections + PARAMS ((bfd *, struct bfd_link_info *)); +static boolean xstormy16_elf_relocate_section + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); +static boolean xstormy16_elf_finish_dynamic_sections + PARAMS((bfd *, struct bfd_link_info *)); +static boolean xstormy16_elf_gc_sweep_hook + PARAMS ((bfd *, struct bfd_link_info *, asection *, + const Elf_Internal_Rela *)); +static asection * xstormy16_elf_gc_mark_hook + PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, + struct elf_link_hash_entry *, Elf_Internal_Sym *)); + +static reloc_howto_type xstormy16_elf_howto_table [] = +{ + /* This reloc does nothing. */ + HOWTO (R_XSTORMY16_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_XSTORMY16_NONE", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + + /* A 32 bit absolute relocation. */ + HOWTO (R_XSTORMY16_32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_XSTORMY16_32", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A 16 bit absolute relocation. */ + HOWTO (R_XSTORMY16_16, /* 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_XSTORMY16_16", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* An 8 bit absolute relocation. */ + HOWTO (R_XSTORMY16_8, /* 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_XSTORMY16_8", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ + + /* A 32 bit pc-relative relocation. */ + HOWTO (R_XSTORMY16_PC32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_XSTORMY16_PC32", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A 16 bit pc-relative relocation. */ + HOWTO (R_XSTORMY16_PC16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_XSTORMY16_PC16", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* An 8 bit pc-relative relocation. */ + HOWTO (R_XSTORMY16_PC8, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 8, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_XSTORMY16_PC8", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A 12-bit pc-relative relocation suitable for the branch instructions. */ + HOWTO (R_XSTORMY16_REL_12, /* type */ + 1, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 11, /* bitsize */ + true, /* pc_relative */ + 1, /* bitpos */ + complain_overflow_signed, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_XSTORMY16_REL_12", /* name */ + true, /* partial_inplace */ + 0, /* src_mask */ + 0x0fff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A 24-bit absolute relocation suitable for the jump instructions. */ + HOWTO (R_XSTORMY16_24, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 24, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_unsigned, /* complain_on_overflow */ + xstormy16_elf_24_reloc, /* special_function */ + "R_XSTORMY16_24", /* name */ + true, /* partial_inplace */ + 0, /* src_mask */ + 0xffff00ff, /* dst_mask */ + true), /* pcrel_offset */ + + /* A 16 bit absolute relocation to a function pointer. */ + HOWTO (R_XSTORMY16_FPTR16, /* 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_XSTORMY16_FPTR16", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + false), /* pcrel_offset */ +}; + +static reloc_howto_type xstormy16_elf_howto_table2 [] = +{ + /* GNU extension to record C++ vtable hierarchy */ + HOWTO (R_XSTORMY16_GNU_VTINHERIT, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + NULL, /* special_function */ + "R_XSTORMY16_GNU_VTINHERIT", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + + /* GNU extension to record C++ vtable member usage */ + HOWTO (R_XSTORMY16_GNU_VTENTRY, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + _bfd_elf_rel_vtable_reloc_fn, /* special_function */ + "R_XSTORMY16_GNU_VTENTRY", /* name */ + false, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + false), /* pcrel_offset */ + +}; + +/* Map BFD reloc types to XSTORMY16 ELF reloc types. */ + +struct xstormy16_reloc_map +{ + bfd_reloc_code_real_type bfd_reloc_val; + unsigned int xstormy16_reloc_val; +}; + +static const struct xstormy16_reloc_map xstormy16_reloc_map [] = +{ + { BFD_RELOC_NONE, R_XSTORMY16_NONE }, + { BFD_RELOC_32, R_XSTORMY16_32 }, + { BFD_RELOC_16, R_XSTORMY16_16 }, + { BFD_RELOC_8, R_XSTORMY16_8 }, + { BFD_RELOC_32_PCREL, R_XSTORMY16_PC32 }, + { BFD_RELOC_16_PCREL, R_XSTORMY16_PC16 }, + { BFD_RELOC_8_PCREL, R_XSTORMY16_PC8 }, + { BFD_RELOC_XSTORMY16_REL_12, R_XSTORMY16_REL_12 }, + { BFD_RELOC_XSTORMY16_24, R_XSTORMY16_24 }, + { BFD_RELOC_XSTORMY16_FPTR16, R_XSTORMY16_FPTR16 }, + { BFD_RELOC_VTABLE_INHERIT, R_XSTORMY16_GNU_VTINHERIT }, + { BFD_RELOC_VTABLE_ENTRY, R_XSTORMY16_GNU_VTENTRY }, +}; + +static reloc_howto_type * +xstormy16_reloc_type_lookup (abfd, code) + bfd * abfd ATTRIBUTE_UNUSED; + bfd_reloc_code_real_type code; +{ + unsigned int i; + + for (i = sizeof (xstormy16_reloc_map) / sizeof (xstormy16_reloc_map[0]); + --i;) + if (xstormy16_reloc_map [i].bfd_reloc_val == code) + return & xstormy16_elf_howto_table [xstormy16_reloc_map[i].xstormy16_reloc_val]; + + return NULL; +} + +/* Set the howto pointer for an XSTORMY16 ELF reloc. */ + +static void +xstormy16_info_to_howto_rela (abfd, cache_ptr, dst) + bfd * abfd ATTRIBUTE_UNUSED; + arelent * cache_ptr; + Elf32_Internal_Rela * dst; +{ + unsigned int r_type = ELF32_R_TYPE (dst->r_info); + + if (r_type <= (unsigned int) R_XSTORMY16_FPTR16) + cache_ptr->howto = &xstormy16_elf_howto_table [r_type]; + else if (r_type - R_XSTORMY16_GNU_VTINHERIT + <= (unsigned int) R_XSTORMY16_GNU_VTENTRY) + cache_ptr->howto + = &xstormy16_elf_howto_table2 [r_type - R_XSTORMY16_GNU_VTINHERIT]; + else + abort (); +} + +/* Handle the R_XSTORMY16_24 reloc, which has an odd bit arrangement. */ + +static bfd_reloc_status_type +xstormy16_elf_24_reloc (abfd, reloc_entry, symbol, data, input_section, + output_bfd, error_message) + bfd *abfd; + arelent *reloc_entry; + asymbol *symbol; + PTR data; + asection *input_section; + bfd *output_bfd; + char **error_message ATTRIBUTE_UNUSED; +{ + bfd_vma relocation, x; + + if (output_bfd != NULL) + { + reloc_entry->address += input_section->output_offset; + return bfd_reloc_ok; + } + + if (reloc_entry->address > input_section->_cooked_size) + return bfd_reloc_outofrange; + + if (bfd_is_com_section (symbol->section)) + relocation = 0; + else + relocation = symbol->value; + + relocation += symbol->section->output_section->vma; + relocation += symbol->section->output_offset; + relocation += reloc_entry->addend; + + x = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); + x &= 0x0000ff00; + x |= relocation & 0xff; + x |= (relocation << 8) & 0xffff0000; + bfd_put_32 (abfd, x, (bfd_byte *) data + reloc_entry->address); + + if (relocation & ~ (bfd_vma) 0xffffff) + return bfd_reloc_overflow; + + return bfd_reloc_ok; +} + +/* We support 16-bit pointers to code above 64k by generating a thunk + below 64k containing a JMPF instruction to the final address. We + cannot, unfortunately, minimize the number of thunks unless the + -relax switch is given, as otherwise we have no idea where the + sections will fall in the address space. */ + +static boolean +xstormy16_elf_check_relocs (abfd, info, sec, relocs) + bfd *abfd; + struct bfd_link_info *info; + asection *sec; + const Elf_Internal_Rela *relocs; +{ + const Elf_Internal_Rela *rel, *relend; + struct elf_link_hash_entry **sym_hashes; + Elf_Internal_Shdr *symtab_hdr; + bfd_vma *local_plt_offsets; + asection *splt; + bfd *dynobj; + + if (info->relocateable) + return true; + + symtab_hdr = &elf_tdata(abfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (abfd); + local_plt_offsets = elf_local_got_offsets (abfd); + splt = NULL; + dynobj = elf_hash_table(info)->dynobj; + + relend = relocs + sec->reloc_count; + for (rel = relocs; rel < relend; ++rel) + { + unsigned long r_symndx; + struct elf_link_hash_entry *h; + bfd_vma *offset; + + 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]; + 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; + } + + switch (ELF32_R_TYPE (rel->r_info)) + { + /* This relocation describes a 16-bit pointer to a function. + We may need to allocate a thunk in low memory; reserve memory + for it now. */ + case R_XSTORMY16_FPTR16: + if (rel->r_addend != 0) + { + (*info->callbacks->warning) + (info, _("non-zero addend in @fptr reloc"), 0, + abfd, 0, 0); + } + + if (dynobj == NULL) + elf_hash_table (info)->dynobj = dynobj = abfd; + if (splt == NULL) + { + splt = bfd_get_section_by_name (dynobj, ".plt"); + if (splt == NULL) + { + splt = bfd_make_section (dynobj, ".plt"); + if (splt == NULL + || ! bfd_set_section_flags (dynobj, splt, + (SEC_ALLOC + | SEC_LOAD + | SEC_HAS_CONTENTS + | SEC_IN_MEMORY + | SEC_LINKER_CREATED + | SEC_READONLY + | SEC_CODE)) + || ! bfd_set_section_alignment (dynobj, splt, 1)) + return false; + } + } + + if (h != NULL) + offset = &h->plt.offset; + else + { + if (local_plt_offsets == NULL) + { + size_t size; + unsigned int i; + + size = symtab_hdr->sh_info * sizeof (bfd_vma); + local_plt_offsets = (bfd_vma *) bfd_alloc (abfd, size); + if (local_plt_offsets == NULL) + return false; + elf_local_got_offsets (abfd) = local_plt_offsets; + + for (i = 0; i < symtab_hdr->sh_info; i++) + local_plt_offsets[i] = (bfd_vma) -1; + } + offset = &local_plt_offsets[r_symndx]; + } + + if (*offset == (bfd_vma) -1) + { + *offset = splt->_raw_size; + splt->_raw_size += 4; + } + break; + + /* This relocation describes the C++ object vtable hierarchy. + Reconstruct it for later use during GC. */ + case R_XSTORMY16_GNU_VTINHERIT: + if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) + return false; + break; + + /* This relocation describes which C++ vtable entries are actually + used. Record for later use during GC. */ + case R_XSTORMY16_GNU_VTENTRY: + if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend)) + return false; + break; + } + } + + return true; +} + +/* A subroutine of xstormy16_elf_relax_section. If the global symbol H + is within the low 64k, remove any entry for it in the plt. */ + +struct relax_plt_data +{ + asection *splt; + boolean *again; +}; + +static boolean +xstormy16_relax_plt_check (h, xdata) + struct elf_link_hash_entry *h; + PTR xdata; +{ + struct relax_plt_data *data = (struct relax_plt_data *) xdata; + + if (h->plt.offset != (bfd_vma) -1) + { + bfd_vma address; + + if (h->root.type == bfd_link_hash_undefined + || h->root.type == bfd_link_hash_undefweak) + address = 0; + else + address = (h->root.u.def.section->output_section->vma + + h->root.u.def.section->output_offset + + h->root.u.def.value); + + if (address <= 0xffff) + { + h->plt.offset = -1; + data->splt->_cooked_size -= 4; + *data->again = true; + } + } + + return true; +} + +/* A subroutine of xstormy16_elf_relax_section. If the global symbol H + previously had a plt entry, give it a new entry offset. */ + +static boolean +xstormy16_relax_plt_realloc (h, xdata) + struct elf_link_hash_entry *h; + PTR xdata; +{ + bfd_vma *entry = (bfd_vma *) xdata; + + if (h->plt.offset != (bfd_vma) -1) + { + h->plt.offset = *entry; + *entry += 4; + } + + return true; +} + +static boolean +xstormy16_elf_relax_section (dynobj, splt, info, again) + bfd *dynobj; + asection *splt; + struct bfd_link_info *info; + boolean *again; +{ + struct relax_plt_data relax_plt_data; + bfd *ibfd; + + /* Assume nothing changes. */ + *again = false; + + if (info->relocateable) + return true; + + /* We only relax the .plt section at the moment. */ + if (dynobj != elf_hash_table (info)->dynobj + || strcmp (splt->name, ".plt") != 0) + return true; + + /* Quick check for an empty plt. */ + if (splt->_raw_size == 0) + return true; + + /* If this is the first time we have been called for this section, + initialize the cooked size. */ + if (splt->_cooked_size == 0) + splt->_cooked_size = splt->_raw_size; + + /* Map across all global symbols; see which ones happen to + fall in the low 64k. */ + relax_plt_data.splt = splt; + relax_plt_data.again = again; + elf_link_hash_traverse (elf_hash_table (info), xstormy16_relax_plt_check, + &relax_plt_data); + + /* Likewise for local symbols, though that's somewhat less convenient + as we have walk the list of input bfds and swap in symbol data. */ + for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link_next) + { + bfd_vma *local_plt_offsets = elf_local_got_offsets (ibfd); + Elf_Internal_Shdr *symtab_hdr; + Elf32_External_Sym *extsyms; + unsigned int idx; + + if (! local_plt_offsets) + continue; + + symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; + + if (symtab_hdr->contents != NULL) + extsyms = (Elf32_External_Sym *) symtab_hdr->contents; + else + { + extsyms = (Elf32_External_Sym *) bfd_malloc (symtab_hdr->sh_size); + if (extsyms == NULL) + return false; + if (bfd_seek (ibfd, symtab_hdr->sh_offset, SEEK_SET) != 0 + || (bfd_bread (extsyms, symtab_hdr->sh_size, ibfd) + != symtab_hdr->sh_size)) + { + free (extsyms); + return false; + } + } + + for (idx = 0; idx < symtab_hdr->sh_info; ++idx) + { + Elf_Internal_Sym isym; + asection *tsec; + bfd_vma address; + + if (local_plt_offsets[idx] == (bfd_vma) -1) + continue; + + bfd_elf32_swap_symbol_in (ibfd, extsyms + idx, &isym); + if (isym.st_shndx == SHN_UNDEF) + continue; + else if (isym.st_shndx > 0 && isym.st_shndx < SHN_LORESERVE) + tsec = bfd_section_from_elf_index (ibfd, isym.st_shndx); + else if (isym.st_shndx == SHN_ABS) + tsec = bfd_abs_section_ptr; + else + continue; + + address = (tsec->output_section->vma + + tsec->output_offset + + isym.st_value); + if (address <= 0xffff) + { + local_plt_offsets[idx] = -1; + splt->_cooked_size -= 4; + *again = true; + } + } + + if (symtab_hdr->contents != extsyms) + free (extsyms); + } + + /* If we changed anything, walk the symbols again to reallocate + .plt entry addresses. */ + if (*again && splt->_cooked_size > 0) + { + bfd_vma entry = 0; + + elf_link_hash_traverse (elf_hash_table (info), + xstormy16_relax_plt_realloc, &entry); + + for (ibfd = info->input_bfds; ibfd ; ibfd = ibfd->link_next) + { + bfd_vma *local_plt_offsets = elf_local_got_offsets (ibfd); + unsigned int nlocals = elf_tdata (ibfd)->symtab_hdr.sh_info; + unsigned int idx; + + if (! local_plt_offsets) + continue; + + for (idx = 0; idx < nlocals; ++idx) + if (local_plt_offsets[idx] != (bfd_vma) -1) + { + local_plt_offsets[idx] = entry; + entry += 4; + } + } + } + + splt->_raw_size = splt->_cooked_size; + return true; +} + +static boolean +xstormy16_elf_always_size_sections (output_bfd, info) + bfd *output_bfd ATTRIBUTE_UNUSED; + struct bfd_link_info *info; +{ + bfd *dynobj; + asection *splt; + + if (info->relocateable) + return true; + + dynobj = elf_hash_table (info)->dynobj; + if (dynobj == NULL) + return true; + + splt = bfd_get_section_by_name (dynobj, ".plt"); + BFD_ASSERT (splt != NULL); + + splt->contents = (bfd_byte *) bfd_zalloc (dynobj, splt->_raw_size); + if (splt->contents == NULL) + return false; + + return true; +} + +/* Relocate an XSTORMY16 ELF section. + There is some attempt to make this function usable for many architectures, + both USE_REL and USE_RELA ['twould be nice if such a critter existed], + if only to serve as a learning tool. + + The RELOCATE_SECTION function is called by the new 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 adjusting 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 +xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section, + contents, relocs, local_syms, local_sections) + bfd * output_bfd ATTRIBUTE_UNUSED; + 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; + struct elf_link_hash_entry ** sym_hashes; + Elf_Internal_Rela * rel; + Elf_Internal_Rela * relend; + bfd *dynobj; + asection *splt; + + symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (input_bfd); + relend = relocs + input_section->reloc_count; + + dynobj = elf_hash_table (info)->dynobj; + splt = NULL; + if (dynobj != NULL) + splt = bfd_get_section_by_name (dynobj, ".plt"); + + for (rel = relocs; rel < relend; rel ++) + { + reloc_howto_type * howto; + unsigned long r_symndx; + Elf_Internal_Sym * sym; + asection * sec; + struct elf_link_hash_entry * h; + bfd_vma relocation; + bfd_reloc_status_type r; + const char * name = NULL; + int r_type; + + r_type = ELF32_R_TYPE (rel->r_info); + + if ( r_type == R_XSTORMY16_GNU_VTINHERIT + || r_type == R_XSTORMY16_GNU_VTENTRY) + continue; + + 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 (ELF_ST_TYPE (sym->st_info) == STT_SECTION) + { + sec = local_sections [r_symndx]; + rel->r_addend += sec->output_offset + sym->st_value; + } + } + + continue; + } + + /* This is a final link. */ + howto = xstormy16_elf_howto_table + ELF32_R_TYPE (rel->r_info); + h = NULL; + sym = NULL; + sec = NULL; + + if (r_symndx < symtab_hdr->sh_info) + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; + relocation = (sec->output_section->vma + + sec->output_offset + + sym->st_value); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); + name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name; + } + 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; + + 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; + 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->callbacks->undefined_symbol) + (info, h->root.root.string, input_bfd, + input_section, rel->r_offset, true))) + return false; + relocation = 0; + } + } + + switch (ELF32_R_TYPE (rel->r_info)) + { + case R_XSTORMY16_24: + { + bfd_vma reloc = relocation + rel->r_addend; + unsigned int x; + + x = bfd_get_32 (input_bfd, contents + rel->r_offset); + x &= 0x0000ff00; + x |= reloc & 0xff; + x |= (reloc << 8) & 0xffff0000; + bfd_put_32 (input_bfd, x, contents + rel->r_offset); + + if (reloc & ~0xffffff) + r = bfd_reloc_overflow; + else + r = bfd_reloc_ok; + break; + } + + case R_XSTORMY16_FPTR16: + { + bfd_vma *plt_offset; + + if (h != NULL) + plt_offset = &h->plt.offset; + else + plt_offset = elf_local_got_offsets (input_bfd) + r_symndx; + + if (relocation <= 0xffff) + { + /* If the symbol is in range for a 16-bit address, we should + have deallocated the plt entry in relax_section. */ + BFD_ASSERT (*plt_offset == (bfd_vma) -1); + } + else + { + /* If the symbol is out of range for a 16-bit address, + we must have allocated a plt entry. */ + BFD_ASSERT (*plt_offset != (bfd_vma) -1); + + /* If this is the first time we've processed this symbol, + fill in the plt entry with the correct symbol address. */ + if ((*plt_offset & 1) == 0) + { + unsigned int x; + + x = 0x00000200; /* jmpf */ + x |= relocation & 0xff; + x |= (relocation << 8) & 0xffff0000; + bfd_put_32 (input_bfd, x, splt->contents + *plt_offset); + *plt_offset |= 1; + } + + relocation = (splt->output_section->vma + + splt->output_offset + + (*plt_offset & -2)); + } + r = _bfd_final_link_relocate (howto, input_bfd, input_section, + contents, rel->r_offset, + relocation, 0); + break; + } + + default: + r = _bfd_final_link_relocate (howto, input_bfd, input_section, + contents, rel->r_offset, + relocation, rel->r_addend); + break; + } + + if (r != bfd_reloc_ok) + { + const char * msg = (const char *) NULL; + + switch (r) + { + case bfd_reloc_overflow: + r = info->callbacks->reloc_overflow + (info, name, howto->name, (bfd_vma) 0, + input_bfd, input_section, rel->r_offset); + break; + + case bfd_reloc_undefined: + r = info->callbacks->undefined_symbol + (info, name, input_bfd, input_section, rel->r_offset, + true); + break; + + case bfd_reloc_outofrange: + msg = _("internal error: out of range error"); + break; + + case bfd_reloc_notsupported: + msg = _("internal error: unsupported relocation error"); + break; + + case bfd_reloc_dangerous: + msg = _("internal error: dangerous relocation"); + break; + + default: + msg = _("internal error: unknown error"); + break; + } + + if (msg) + r = info->callbacks->warning + (info, msg, name, input_bfd, input_section, rel->r_offset); + + if (! r) + return false; + } + } + + return true; +} + +/* This must exist if dynobj is ever set. */ + +static boolean +xstormy16_elf_finish_dynamic_sections (abfd, info) + bfd *abfd ATTRIBUTE_UNUSED; + struct bfd_link_info *info; +{ + bfd *dynobj; + asection *splt; + + /* As an extra sanity check, verify that all plt entries have + been filled in. */ + + if ((dynobj = elf_hash_table (info)->dynobj) != NULL + && (splt = bfd_get_section_by_name (dynobj, ".plt")) != NULL) + { + bfd_byte *contents = splt->contents; + unsigned int i, size = splt->_raw_size; + for (i = 0; i < size; i += 4) + { + unsigned int x = bfd_get_32 (dynobj, contents + i); + BFD_ASSERT (x != 0); + } + } + + return true; +} + +/* Return the section that should be marked against GC for a given + relocation. */ + +static asection * +xstormy16_elf_gc_mark_hook (abfd, info, rel, h, sym) + bfd * abfd; + struct bfd_link_info * info ATTRIBUTE_UNUSED; + Elf_Internal_Rela * rel; + struct elf_link_hash_entry * h; + Elf_Internal_Sym * sym; +{ + if (h != NULL) + { + switch (ELF32_R_TYPE (rel->r_info)) + { + case R_XSTORMY16_GNU_VTINHERIT: + case R_XSTORMY16_GNU_VTENTRY: + break; + + default: + switch (h->root.type) + { + case bfd_link_hash_defined: + case bfd_link_hash_defweak: + return h->root.u.def.section; + + case bfd_link_hash_common: + return h->root.u.c.p->section; + + default: + break; + } + } + } + else + { + if (!(elf_bad_symtab (abfd) + && ELF_ST_BIND (sym->st_info) != STB_LOCAL) + && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE) + && sym->st_shndx != SHN_COMMON)) + { + return bfd_section_from_elf_index (abfd, sym->st_shndx); + } + } + + return NULL; +} + +/* Update the got entry reference counts for the section being removed. */ + +static boolean +xstormy16_elf_gc_sweep_hook (abfd, info, sec, relocs) + bfd * abfd ATTRIBUTE_UNUSED; + struct bfd_link_info * info ATTRIBUTE_UNUSED; + asection * sec ATTRIBUTE_UNUSED; + const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED; +{ + return true; +} + +#define ELF_ARCH bfd_arch_xstormy16 +#define ELF_MACHINE_CODE EM_XSTORMY16 +#define ELF_MAXPAGESIZE 0x100 + +#define TARGET_LITTLE_SYM bfd_elf32_xstormy16_vec +#define TARGET_LITTLE_NAME "elf32-xstormy16" + +#define elf_info_to_howto_rel NULL +#define elf_info_to_howto xstormy16_info_to_howto_rela +#define elf_backend_relocate_section xstormy16_elf_relocate_section +#define elf_backend_gc_mark_hook xstormy16_elf_gc_mark_hook +#define elf_backend_gc_sweep_hook xstormy16_elf_gc_sweep_hook +#define elf_backend_check_relocs xstormy16_elf_check_relocs +#define elf_backend_always_size_sections \ + xstormy16_elf_always_size_sections +#define elf_backend_finish_dynamic_sections \ + xstormy16_elf_finish_dynamic_sections + +#define elf_backend_can_gc_sections 1 + +#define bfd_elf32_bfd_reloc_type_lookup xstormy16_reloc_type_lookup +#define bfd_elf32_bfd_relax_section xstormy16_elf_relax_section + +#include "elf32-target.h" diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 7c3bad745..89b6f1a87 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -1141,6 +1141,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_H8_DIR24A8", "BFD_RELOC_H8_DIR24R8", "BFD_RELOC_H8_DIR32A16", + "BFD_RELOC_XSTORMY16_REL_12", + "BFD_RELOC_XSTORMY16_24", + "BFD_RELOC_XSTORMY16_FPTR16", "@@overflow: BFD_RELOC_UNUSED@@", }; #endif diff --git a/bfd/reloc.c b/bfd/reloc.c index e0e7d1633..c7c1c378f 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -3253,6 +3253,15 @@ ENUMX ENUMDOC H8 elf Relocations. +ENUM + BFD_RELOC_XSTORMY16_REL_12 +ENUMX + BFD_RELOC_XSTORMY16_24 +ENUMX + BFD_RELOC_XSTORMY16_FPTR16 +ENUMDOC + Sony Xstormy16 Relocations. + ENDSENUM BFD_RELOC_UNUSED CODE_FRAGMENT diff --git a/bfd/targets.c b/bfd/targets.c index ffbf9f14c..fb083da19 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -554,6 +554,7 @@ extern const bfd_target bfd_elf32_tradbigmips_vec; extern const bfd_target bfd_elf32_tradlittlemips_vec; extern const bfd_target bfd_elf32_us_cris_vec; extern const bfd_target bfd_elf32_v850_vec; +extern const bfd_target bfd_elf32_xstormy16_vec; extern const bfd_target bfd_elf64_alpha_vec; extern const bfd_target bfd_elf64_big_generic_vec; extern const bfd_target bfd_elf64_bigmips_vec; @@ -793,6 +794,7 @@ static const bfd_target * const _bfd_target_vector[] = { &bfd_elf32_tradlittlemips_vec, &bfd_elf32_us_cris_vec, &bfd_elf32_v850_vec, + &bfd_elf32_xstormy16_vec, #ifdef BFD64 &bfd_elf64_alpha_vec, &bfd_elf64_big_generic_vec, diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 3a9cbf5ed..fa3b1a95d 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2001-12-07 Geoffrey Keating + + * readelf.c (guess_is_rela): Add support for stormy16. + (dump_relocations): Likewise. + (get_machine_name): Likewise. + 2001-12-05 Nick Clifton * dllwrap.c (main) Replace multiple strings describing a diff --git a/binutils/readelf.c b/binutils/readelf.c index 90306395f..eecfcafd3 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -77,6 +77,7 @@ #include "elf/i860.h" #include "elf/x86-64.h" #include "elf/s390.h" +#include "elf/xstormy16.h" #include "bucomm.h" #include "getopt.h" @@ -595,6 +596,7 @@ guess_is_rela (e_machine) case EM_S390: case EM_S390_OLD: case EM_MMIX: + case EM_XSTORMY16: return TRUE; case EM_MMA: @@ -1009,6 +1011,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) case EM_S390: rtype = elf_s390_reloc_type (type); break; + + case EM_XSTORMY16: + rtype = elf_xstormy16_reloc_type (type); + break; } if (rtype == NULL) @@ -1396,6 +1402,7 @@ get_machine_name (e_machine) case EM_X86_64: return "Advanced Micro Devices X86-64"; case EM_S390_OLD: case EM_S390: return "IBM S/390"; + case EM_XSTORMY16: return "Sanyo Xstormy16 CPU core"; default: sprintf (buff, _(": %x"), e_machine); return buff; diff --git a/gas/ChangeLog b/gas/ChangeLog index 75009c266..fc5204c0c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,13 @@ +2001-12-07 Geoffrey Keating + Richard Henderson + + * configure.in: Add support for xstormy16. + * configure: Regenerated. + * Makefile.am: Add support for xstormy16. + * Makefile.in: Regenerated. + * config/tc-xstormy16.c: New file. + * config/tc-xstormy16.h: New file. + 2001-12-06 Richard Earnshaw (rearnsha@arm.com) * tc-arm.c (do_arit, do_cmp, do_mov, do_ldst, do_ldstt, do_ldmstm) diff --git a/gas/Makefile.am b/gas/Makefile.am index 14ead2f86..3ecf6d2f4 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -78,6 +78,7 @@ CPU_TYPES = \ vax \ w65 \ v850 \ + xstormy16 \ z8k # Object format types. This is only used for dependency information. @@ -263,6 +264,7 @@ TARGET_CPU_CFILES = \ config/tc-vax.c \ config/tc-w65.c \ config/tc-v850.c \ + config/tc-xstormy16.c \ config/tc-z8k.c TARGET_CPU_HFILES = \ @@ -307,6 +309,7 @@ TARGET_CPU_HFILES = \ config/tc-vax.h \ config/tc-w65.h \ config/tc-v850.h \ + config/tc-xstormy16.h \ config/tc-z8k.h # OBJ files in config diff --git a/gas/Makefile.in b/gas/Makefile.in index 7a510ea2e..f2112cc4c 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am +# Makefile.in generated automatically by automake 1.4 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -189,6 +189,7 @@ CPU_TYPES = \ vax \ w65 \ v850 \ + xstormy16 \ z8k @@ -380,6 +381,7 @@ TARGET_CPU_CFILES = \ config/tc-vax.c \ config/tc-w65.c \ config/tc-v850.c \ + config/tc-xstormy16.c \ config/tc-z8k.c @@ -425,6 +427,7 @@ TARGET_CPU_HFILES = \ config/tc-vax.h \ config/tc-w65.h \ config/tc-v850.h \ + config/tc-xstormy16.h \ config/tc-z8k.h @@ -2354,7 +2357,7 @@ maintainer-clean-recursive: dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ - test "$$subdir" != "." || dot_seen=yes; \ + test "$$subdir" = "." && dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ diff --git a/gas/config/tc-xstormy16.c b/gas/config/tc-xstormy16.c new file mode 100644 index 000000000..7ef10e53f --- /dev/null +++ b/gas/config/tc-xstormy16.c @@ -0,0 +1,650 @@ +/* tc-xstormy16.c -- Assembler for the Sanyo XSTORMY16. + Copyright (C) 2000, 2001 Free Software Foundation. + + 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. */ + +#include +#include "as.h" +#include "subsegs.h" +#include "symcat.h" +#include "opcodes/xstormy16-desc.h" +#include "opcodes/xstormy16-opc.h" +#include "cgen.h" + +/* Structure to hold all of the different components describing + an individual instruction. */ +typedef struct +{ + const CGEN_INSN * insn; + const CGEN_INSN * orig_insn; + CGEN_FIELDS fields; +#if CGEN_INT_INSN_P + CGEN_INSN_INT buffer [1]; +#define INSN_VALUE(buf) (*(buf)) +#else + unsigned char buffer [CGEN_MAX_INSN_SIZE]; +#define INSN_VALUE(buf) (buf) +#endif + char * addr; + fragS * frag; + int num_fixups; + fixS * fixups [GAS_CGEN_MAX_FIXUPS]; + int indices [MAX_OPERAND_INSTANCES]; +} +xstormy16_insn; + +const char comment_chars[] = ";"; +const char line_comment_chars[] = "#"; +const char line_separator_chars[] = "|"; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; + +#define O_fptr_symbol (O_max + 1) + +#define XSTORMY16_SHORTOPTS "" +const char * md_shortopts = XSTORMY16_SHORTOPTS; + +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 ATTRIBUTE_UNUSED; + char * arg ATTRIBUTE_UNUSED; +{ + return 0; +} + +void +md_show_usage (stream) + FILE * stream; +{ + fprintf (stream, _(" XSTORMY16 specific command line options:\n")); +} + +/* The target specific pseudo-ops which we support. */ +const pseudo_typeS md_pseudo_table[] = +{ + { "word", cons, 4 }, + { NULL, NULL, 0 } +}; + + +void +md_begin () +{ + /* Initialize the `cgen' interface. */ + + /* Set the machine number and endian. */ + gas_cgen_cpu_desc = xstormy16_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, 0, + CGEN_CPU_OPEN_ENDIAN, + CGEN_ENDIAN_LITTLE, + CGEN_CPU_OPEN_END); + xstormy16_cgen_init_asm (gas_cgen_cpu_desc); + + /* This is a callback from cgen to gas to parse operands. */ + cgen_set_parse_operand_fn (gas_cgen_cpu_desc, gas_cgen_parse_operand); +} + +void +md_assemble (str) + char * str; +{ + xstormy16_insn insn; + char * errmsg; + + /* Initialize GAS's cgen interface for a new instruction. */ + gas_cgen_init_parse (); + + insn.insn = xstormy16_cgen_assemble_insn + (gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, & errmsg); + + if (!insn.insn) + { + as_bad (errmsg); + return; + } + + /* Doesn't really matter what we pass for RELAX_P here. */ + gas_cgen_finish_insn (insn.insn, insn.buffer, + CGEN_FIELDS_BITSIZE (& insn.fields), 0, NULL); +} + +void +md_operand (e) + expressionS * e; +{ + if (*input_line_pointer != '@') + return; + + if (strncmp (input_line_pointer+1, "fptr", 4) == 0) + { + input_line_pointer += 5; + SKIP_WHITESPACE (); + if (*input_line_pointer != '(') + { + as_bad ("Expected '('"); + goto err; + } + input_line_pointer++; + + expression (e); + + if (*input_line_pointer != ')') + { + as_bad ("Missing ')'"); + goto err; + } + input_line_pointer++; + + if (e->X_op != O_symbol) + as_bad ("Not a symbolic expression"); + else + e->X_op = O_fptr_symbol; + } + + return; + err: + ignore_rest_of_line (); +} + +/* Called while parsing data to create a fixup. + Create BFD_RELOC_XSTORMY16_FPTR16 relocations. */ + +void +xstormy16_cons_fix_new (f, where, nbytes, exp) + fragS *f; + int where; + int nbytes; + expressionS *exp; +{ + bfd_reloc_code_real_type code; + fixS *fix; + + if (exp->X_op == O_fptr_symbol) + { + if (nbytes != 2) + { + as_bad ("unsupported fptr fixup size %d", nbytes); + return; + } + exp->X_op = O_symbol; + code = BFD_RELOC_XSTORMY16_FPTR16; + } + else if (nbytes == 1) + code = BFD_RELOC_8; + else if (nbytes == 2) + code = BFD_RELOC_16; + else if (nbytes == 4) + code = BFD_RELOC_32; + else + { + as_bad ("unsupported fixup size %d", nbytes); + return; + } + + fix = fix_new_exp (f, where, nbytes, exp, 0, code); +} + +/* Called while parsing an instruction to create a fixup. + Create BFD_RELOC_XSTORMY16_FPTR16 relocations. */ + +fixS * +xstormy16_cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp) + fragS * frag; + int where; + const CGEN_INSN * insn; + int length; + const CGEN_OPERAND * operand; + int opinfo; + expressionS * exp; +{ + fixS *fixP; + operatorT op = exp->X_op; + + if (op == O_fptr_symbol) + exp->X_op = O_symbol; + + fixP = gas_cgen_record_fixup_exp (frag, where, insn, length, + operand, opinfo, exp); + + if (op == O_fptr_symbol) + { + if (operand->type != XSTORMY16_OPERAND_IMM16) + as_bad ("unsupported fptr fixup"); + else + { + fixP->fx_r_type = BFD_RELOC_XSTORMY16_FPTR16; + fixP->fx_where += 2; + } + } + + return fixP; +} + +valueT +md_section_align (segment, size) + segT segment; + valueT size; +{ + int align = bfd_get_section_alignment (stdoutput, segment); + return ((size + (1 << align) - 1) & (-1 << align)); +} + +symbolS * +md_undefined_symbol (name) + char * name ATTRIBUTE_UNUSED; +{ + return 0; +} + +/* Return an initial guess of the length by which a fragment must grow to + hold a branch to reach its destination. + Also updates fr_type/fr_subtype as necessary. + + Called just before doing relaxation. + Any symbol that is now undefined will not become defined. + The guess for fr_var is ACTUALLY the growth beyond fr_fix. + Whatever we do to grow fr_fix or fr_var contributes to our returned value. + Although it may not be explicit in the frag, pretend fr_var starts with a + 0 value. */ + +int +md_estimate_size_before_relax (fragP, segment) + fragS * fragP ATTRIBUTE_UNUSED; + segT segment ATTRIBUTE_UNUSED; +{ + /* No assembler relaxation is defined (or necessary) for this port. */ + abort (); +} + +/* *fragP has been relaxed to its final size, and now needs to have + the bytes inside it modified to conform to the new size. + + Called after relaxation is finished. + fragP->fr_type == rs_machine_dependent. + fragP->fr_subtype is the subtype of what the address relaxed to. */ + +void +md_convert_frag (abfd, sec, fragP) + bfd * abfd ATTRIBUTE_UNUSED; + segT sec ATTRIBUTE_UNUSED; + fragS * fragP ATTRIBUTE_UNUSED; +{ + /* No assembler relaxation is defined (or necessary) for this port. */ + abort (); +} + +/* 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; +{ + if (fixP->fx_addsy != (symbolS *) NULL + && (! S_IS_DEFINED (fixP->fx_addsy) + || S_GET_SEGMENT (fixP->fx_addsy) != sec)) + { + /* The symbol is undefined (or is defined but not in this section). + Let the linker figure it out. */ + return 0; + } + + return fixP->fx_frag->fr_address + fixP->fx_where; +} + +/* Return the bfd reloc type for OPERAND of INSN at fixup FIXP. + Returns BFD_RELOC_NONE if no reloc type can be found. + *FIXP may be modified if desired. */ + +bfd_reloc_code_real_type +md_cgen_lookup_reloc (insn, operand, fixP) + const CGEN_INSN * insn ATTRIBUTE_UNUSED; + const CGEN_OPERAND * operand; + fixS * fixP; +{ + switch (operand->type) + { + case XSTORMY16_OPERAND_IMM2: + case XSTORMY16_OPERAND_IMM3: + case XSTORMY16_OPERAND_IMM3B: + case XSTORMY16_OPERAND_IMM4: + case XSTORMY16_OPERAND_IMM12: + case XSTORMY16_OPERAND_HMEM8: + return BFD_RELOC_NONE; + + case XSTORMY16_OPERAND_IMM8: + case XSTORMY16_OPERAND_LMEM8: + return fixP->fx_pcrel ? BFD_RELOC_8_PCREL : BFD_RELOC_8; + + case XSTORMY16_OPERAND_IMM16: + fixP->fx_where += 2; + return fixP->fx_pcrel ? BFD_RELOC_16_PCREL : BFD_RELOC_16; + + case XSTORMY16_OPERAND_ABS24: + return BFD_RELOC_XSTORMY16_24; + + case XSTORMY16_OPERAND_REL8_2: + case XSTORMY16_OPERAND_REL8_4: + fixP->fx_pcrel = 1; + return BFD_RELOC_8_PCREL; + + case XSTORMY16_OPERAND_REL12: + fixP->fx_where += 2; + /* Fall through... */ + case XSTORMY16_OPERAND_REL12A: + fixP->fx_pcrel = 1; + return BFD_RELOC_XSTORMY16_REL_12; + + default : /* avoid -Wall warning */ + abort (); + } +} + +/* See whether we need to force a relocation into the output file. + This is used to force out switch and PC relative relocations when + relaxing. */ + +int +xstormy16_force_relocation (fix) + fixS * fix; +{ + switch (fix->fx_r_type) + { + case BFD_RELOC_XSTORMY16_FPTR16: + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + return 1; + + default: + return 0; + } +} + +/* Return true if a relocation against a symbol may be replaced with + a relocation against section+offset. */ + +boolean +xstormy16_fix_adjustable (fixP) + fixS * fixP; +{ + if (fixP->fx_addsy == NULL) + return 1; + + /* Prevent all adjustments to global symbols. */ + if (S_IS_EXTERN (fixP->fx_addsy)) + return 0; + + if (S_IS_WEAK (fixP->fx_addsy)) + return 0; + + return ! xstormy16_force_relocation (fixP); +} + +/* This is a copy of gas_cgen_md_apply_fix3, with some enhancements to + do various things that would not be valid for all ports. */ + +void +xstormy16_md_apply_fix3 (fixP, valueP, seg) + fixS * fixP; + valueT * valueP; + segT seg ATTRIBUTE_UNUSED; +{ + char *where = fixP->fx_frag->fr_literal + fixP->fx_where; + valueT value; + /* Canonical name, since used a lot. */ + CGEN_CPU_DESC cd = gas_cgen_cpu_desc; + + /* This port has pc-relative relocs and DIFF_EXPR_OK defined, so + it must deal with turning a BFD_RELOC_{8,16,32,64} into a + BFD_RELOC_*_PCREL for the case of + + .word something-. + */ + if (fixP->fx_pcrel) + switch (fixP->fx_r_type) + { + case BFD_RELOC_8: + fixP->fx_r_type = BFD_RELOC_8_PCREL; + break; + case BFD_RELOC_16: + fixP->fx_r_type = BFD_RELOC_16_PCREL; + break; + case BFD_RELOC_32: + fixP->fx_r_type = BFD_RELOC_32_PCREL; + break; + case BFD_RELOC_64: + fixP->fx_r_type = BFD_RELOC_64_PCREL; + break; + default: + break; + } + + /* FIXME FIXME FIXME: The value we are passed in *valuep includes + the symbol values. Since we are using BFD_ASSEMBLER, if we are + doing this relocation the code in write.c is going to call + bfd_install_relocation, which is also going to use the symbol + value. That means that if the reloc is fully resolved we want to + use *valuep since bfd_install_relocation is not being used. + However, if the reloc is not fully resolved we do not want to use + *valuep, and must use fx_offset instead. However, if the reloc + is PC relative, we do want to use *valuep since it includes the + result of md_pcrel_from. This is confusing. */ + + if (fixP->fx_addsy == (symbolS *) NULL) + { + value = *valueP; + fixP->fx_done = 1; + } + else if (fixP->fx_pcrel) + value = *valueP; + else + { + value = fixP->fx_offset; + if (fixP->fx_subsy != (symbolS *) NULL) + { + if (S_GET_SEGMENT (fixP->fx_subsy) == absolute_section) + value -= S_GET_VALUE (fixP->fx_subsy); + else + { + /* We don't actually support subtracting a symbol. */ + as_bad_where (fixP->fx_file, fixP->fx_line, + _("expression too complex")); + } + } + } + + if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED) + { + int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED; + const CGEN_OPERAND *operand = cgen_operand_lookup_by_num (cd, opindex); + const char *errmsg; + bfd_reloc_code_real_type reloc_type; + CGEN_FIELDS *fields = alloca (CGEN_CPU_SIZEOF_FIELDS (cd)); + const CGEN_INSN *insn = fixP->fx_cgen.insn; + + /* If the reloc has been fully resolved finish the operand here. */ + /* FIXME: This duplicates the capabilities of code in BFD. */ + if (fixP->fx_done) + { + CGEN_CPU_SET_FIELDS_BITSIZE (cd) (fields, CGEN_INSN_BITSIZE (insn)); + CGEN_CPU_SET_VMA_OPERAND (cd) (cd, opindex, fields, (bfd_vma) value); + +#if CGEN_INT_INSN_P + { + CGEN_INSN_INT insn_value = + cgen_get_insn_value (cd, where, CGEN_INSN_BITSIZE (insn)); + + /* ??? 0 is passed for `pc'. */ + errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields, + &insn_value, (bfd_vma) 0); + cgen_put_insn_value (cd, where, CGEN_INSN_BITSIZE (insn), + insn_value); + } +#else + /* ??? 0 is passed for `pc'. */ + errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields, where, + (bfd_vma) 0); +#endif + if (errmsg) + as_bad_where (fixP->fx_file, fixP->fx_line, "%s", errmsg); + } + + if (fixP->fx_done) + return 1; + + /* The operand isn't fully resolved. Determine a BFD reloc value + based on the operand information and leave it to + bfd_install_relocation. Note that this doesn't work when + partial_inplace == false. */ + + reloc_type = md_cgen_lookup_reloc (insn, operand, fixP); + if (reloc_type != BFD_RELOC_NONE) + { + fixP->fx_r_type = reloc_type; + } + else + { + as_bad_where (fixP->fx_file, fixP->fx_line, + _("unresolved expression that must be resolved")); + fixP->fx_done = 1; + return 1; + } + } + else if (fixP->fx_done) + { + /* We're finished with this fixup. Install it because + bfd_install_relocation won't be called to do it. */ + switch (fixP->fx_r_type) + { + case BFD_RELOC_8: + md_number_to_chars (where, value, 1); + break; + case BFD_RELOC_16: + md_number_to_chars (where, value, 2); + break; + case BFD_RELOC_32: + md_number_to_chars (where, value, 4); + break; + case BFD_RELOC_64: + md_number_to_chars (where, value, 8); + break; + default: + as_bad_where (fixP->fx_file, fixP->fx_line, + _("internal error: can't install fix for reloc type %d (`%s')"), + fixP->fx_r_type, bfd_get_reloc_code_name (fixP->fx_r_type)); + break; + } + } + else + { + /* bfd_install_relocation will be called to finish things up. */ + } + + /* This is a RELA port. Thus, it does not need to store a + value if it is going to make a reloc. What's more, when + assembling a line like + + .byte global-0x7f00 + + we'll get a spurious error message if we try to stuff 0x7f00 into + the byte. */ + if (! fixP->fx_done) + *valueP = 0; + + /* Tuck `value' away for use by tc_gen_reloc. + See the comment describing fx_addnumber in write.h. + This field is misnamed (or misused :-). */ + fixP->fx_addnumber = value; + + return 1; +} + + +/* 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_littleendian (buf, val, n); +} + +/* 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. +*/ + +/* Equal to MAX_PRECISION in atof-ieee.c */ +#define MAX_LITTLENUMS 6 + +char * +md_atof (type, litP, sizeP) + char type; + char * litP; + int * sizeP; +{ + int prec; + LITTLENUM_TYPE words [MAX_LITTLENUMS]; + LITTLENUM_TYPE *wordP; + char * t; + + switch (type) + { + case 'f': + case 'F': + prec = 2; + break; + + case 'd': + case 'D': + prec = 4; + break; + + /* FIXME: Some targets allow other format chars for bigger sizes here. */ + + default: + * sizeP = 0; + return _("Bad call to md_atof()"); + } + + t = atof_ieee (input_line_pointer, type, words); + if (t) + input_line_pointer = t; + * sizeP = prec * sizeof (LITTLENUM_TYPE); + + *sizeP = prec * sizeof (LITTLENUM_TYPE); + /* This loops outputs the LITTLENUMs in REVERSE order; in accord with + the littleendianness of the processor. */ + for (wordP = words + prec - 1; prec--;) + { + md_number_to_chars (litP, (valueT) (*wordP--), sizeof (LITTLENUM_TYPE)); + litP += sizeof (LITTLENUM_TYPE); + } + + return 0; +} diff --git a/gas/config/tc-xstormy16.h b/gas/config/tc-xstormy16.h new file mode 100644 index 000000000..07ff31493 --- /dev/null +++ b/gas/config/tc-xstormy16.h @@ -0,0 +1,69 @@ +/* tc-xstormy16.h -- Header file for tc-xstormy16.c. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. + + 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_XSTORMY16 + +#ifndef BFD_ASSEMBLER +/* leading space so will compile with cc */ + #error XSTORMY16 support requires BFD_ASSEMBLER +#endif + +#define LISTING_HEADER "XSTORMY16 GAS " + +/* The target BFD architecture. */ +#define TARGET_ARCH bfd_arch_xstormy16 + +#define TARGET_FORMAT "elf32-xstormy16" + +#define TARGET_BYTES_BIG_ENDIAN 0 + +/* call md_pcrel_from_section, not md_pcrel_from */ +long md_pcrel_from_section PARAMS ((struct fix *, segT)); +#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC) + +/* Permit temporary numeric labels. */ +#define LOCAL_LABELS_FB 1 + +#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */ + +/* We don't need to handle .word strangely. */ +#define WORKING_DOT_WORD + +#define MD_APPLY_FIX3 +#define md_apply_fix3 xstormy16_md_apply_fix3 + +#define obj_fix_adjustable(fixP) xstormy16_fix_adjustable (fixP) +extern boolean xstormy16_fix_adjustable PARAMS ((struct fix *)); + +#define TC_FORCE_RELOCATION(fix) xstormy16_force_relocation (fix) +extern int xstormy16_force_relocation PARAMS ((struct fix *)); + +#define TC_HANDLES_FX_DONE + +#define tc_gen_reloc gas_cgen_tc_gen_reloc + +/* 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 TC_CONS_FIX_NEW xstormy16_cons_fix_new +extern void xstormy16_cons_fix_new PARAMS ((fragS *f, int, int, expressionS *)); + +#define md_cgen_record_fixup_exp xstormy16_cgen_record_fixup_exp diff --git a/gas/configure b/gas/configure index 8391c62c6..0d0b8a8f5 100755 --- a/gas/configure +++ b/gas/configure @@ -55,6 +55,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -169,6 +170,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -339,6 +341,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -504,12 +511,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -548,12 +559,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:552: checking for Cygwin environment" >&5 +echo "configure:563: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -581,19 +592,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:585: checking for mingw32 environment" >&5 +echo "configure:596: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -658,7 +669,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:662: checking host system type" >&5 +echo "configure:673: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -679,7 +690,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:683: checking target system type" >&5 +echo "configure:694: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -697,7 +708,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:701: checking build system type" >&5 +echo "configure:712: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -722,7 +733,7 @@ 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:726: checking for $ac_word" >&5 +echo "configure:737: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -752,7 +763,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:756: checking for $ac_word" >&5 +echo "configure:767: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -803,7 +814,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:807: checking for $ac_word" >&5 +echo "configure:818: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -835,7 +846,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:839: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -846,12 +857,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 850 "configure" +#line 861 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:866: \"$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 @@ -877,12 +888,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:881: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:892: checking whether the C compiler ($CC $CFLAGS $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:886: checking whether we are using GNU C" >&5 +echo "configure:897: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -891,7 +902,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:895: \"$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:906: \"$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 @@ -910,7 +921,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:914: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:925: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -942,7 +953,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:946: checking for POSIXized ISC" >&5 +echo "configure:957: 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 @@ -976,7 +987,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${ # 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:980: checking for a BSD compatible install" >&5 +echo "configure:991: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1029,7 +1040,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:1033: checking whether build environment is sane" >&5 +echo "configure:1044: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1086,7 +1097,7 @@ test "$program_suffix" != NONE && 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:1090: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1101: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -1132,7 +1143,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1136: checking for working aclocal" >&5 +echo "configure:1147: 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. @@ -1145,7 +1156,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1149: checking for working autoconf" >&5 +echo "configure:1160: 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. @@ -1158,7 +1169,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1162: checking for working automake" >&5 +echo "configure:1173: 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. @@ -1171,7 +1182,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1175: checking for working autoheader" >&5 +echo "configure:1186: 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. @@ -1184,7 +1195,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1188: checking for working makeinfo" >&5 +echo "configure:1199: 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. @@ -1279,7 +1290,7 @@ ac_prog=ld if test "$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:1283: checking for ld used by GCC" >&5 +echo "configure:1294: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1309,10 +1320,10 @@ echo "configure:1283: 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:1313: checking for GNU ld" >&5 +echo "configure:1324: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1316: checking for non-GNU ld" >&5 +echo "configure:1327: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1347,7 +1358,7 @@ else 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:1351: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1362: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1364,7 +1375,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1368: checking for $LD option to reload object files" >&5 +echo "configure:1379: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1376,7 +1387,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1380: checking for BSD-compatible nm" >&5 +echo "configure:1391: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1414,7 +1425,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1418: checking whether ln -s works" >&5 +echo "configure:1429: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1435,7 +1446,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1439: checking how to recognise dependant libraries" >&5 +echo "configure:1450: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1599,13 +1610,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1603: checking for object suffix" >&5 +echo "configure:1614: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1625,7 +1636,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1629: checking for executable suffix" >&5 +echo "configure:1640: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1635,10 +1646,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1668,7 +1679,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1672: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1683: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1730,7 +1741,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1734: checking for file" >&5 +echo "configure:1745: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1801,7 +1812,7 @@ esac # 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:1805: checking for $ac_word" >&5 +echo "configure:1816: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1833,7 +1844,7 @@ 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:1837: checking for $ac_word" >&5 +echo "configure:1848: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1868,7 +1879,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1872: checking for $ac_word" >&5 +echo "configure:1883: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1900,7 +1911,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1904: checking for $ac_word" >&5 +echo "configure:1915: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1967,8 +1978,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1971 "configure"' > conftest.$ac_ext - if { (eval echo configure:1972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1982 "configure"' > conftest.$ac_ext + if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -1989,7 +2000,7 @@ 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:1993: checking whether the C compiler needs -belf" >&5 +echo "configure:2004: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2002,14 +2013,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2024: \"$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 @@ -2579,12 +2590,13 @@ EOF fmt=aout ;; vax-*-vms) fmt=vms ;; + w65-*-*) fmt=coff ;; + + xstormy16-*-*) fmt=elf bfd_gas=yes ;; z8k-*-coff | z8k-*-sim) fmt=coff ;; - w65-*-*) fmt=coff ;; - *-*-aout | *-*-scout) fmt=aout ;; *-*-freebsd*) fmt=elf em=freebsd bfd_gas=yes ;; @@ -2707,6 +2719,11 @@ EOF fi ;; + + xstormy16) + using_cgen=yes + ;; + *) ;; esac @@ -3084,7 +3101,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:3088: checking for $ac_word" >&5 +echo "configure:3105: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3114,7 +3131,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:3118: checking for $ac_word" >&5 +echo "configure:3135: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3165,7 +3182,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:3169: checking for $ac_word" >&5 +echo "configure:3186: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3197,7 +3214,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:3201: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:3218: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -3208,12 +3225,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 3212 "configure" +#line 3229 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:3217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3234: \"$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 @@ -3239,12 +3256,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:3243: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3260: checking whether the C compiler ($CC $CFLAGS $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:3248: checking whether we are using GNU C" >&5 +echo "configure:3265: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3253,7 +3270,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3257: \"$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:3274: \"$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 @@ -3272,7 +3289,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:3276: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3293: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3309,7 +3326,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:3313: checking for $ac_word" >&5 +echo "configure:3330: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3340,7 +3357,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3344: checking how to run the C preprocessor" >&5 +echo "configure:3361: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3355,13 +3372,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3382: \"$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 : @@ -3372,13 +3389,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3399: \"$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 : @@ -3389,13 +3406,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3416: \"$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 : @@ -3425,7 +3442,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:3429: checking for $ac_word" >&5 +echo "configure:3446: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3458,7 +3475,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:3462: checking for $ac_word" >&5 +echo "configure:3479: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3492,7 +3509,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:3496: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3513: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3500,7 +3517,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3532: \"$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 @@ -3534,7 +3551,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:3538: checking lex output file root" >&5 +echo "configure:3555: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3555,7 +3572,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:3559: checking whether yytext is a pointer" >&5 +echo "configure:3576: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3567,14 +3584,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3595: \"$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 @@ -3600,7 +3617,7 @@ ALL_LINGUAS="fr" # 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:3604: checking for $ac_word" >&5 +echo "configure:3621: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3628,12 +3645,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3632: checking for ANSI C header files" >&5 +echo "configure:3649: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3641,7 +3658,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3662: \"$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* @@ -3658,7 +3675,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 @@ -3676,7 +3693,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 @@ -3697,7 +3714,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3708,7 +3725,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3732,12 +3749,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3736: checking for working const" >&5 +echo "configure:3753: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3807,21 +3824,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3811: checking for inline" >&5 +echo "configure:3828: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3847,12 +3864,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3851: checking for off_t" >&5 +echo "configure:3868: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3880,12 +3897,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3884: checking for size_t" >&5 +echo "configure:3901: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3915,19 +3932,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:3919: checking for working alloca.h" >&5 +echo "configure:3936: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3948: \"$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 @@ -3948,12 +3965,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3952: checking for alloca" >&5 +echo "configure:3969: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4002: \"$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 @@ -4013,12 +4030,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4017: checking whether alloca needs Cray hooks" >&5 +echo "configure:4034: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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:4047: checking for $ac_func" >&5 +echo "configure:4064: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4092: \"$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 @@ -4098,7 +4115,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4102: checking stack direction for C alloca" >&5 +echo "configure:4119: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4106,7 +4123,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4146: \"$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 @@ -4146,21 +4163,21 @@ EOF fi -for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h +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:4154: checking for $ac_hdr" >&5 +echo "configure:4171: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4181: \"$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* @@ -4189,12 +4206,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4193: checking for $ac_func" >&5 +echo "configure:4210: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4238: \"$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 @@ -4242,7 +4259,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4246: checking for working mmap" >&5 +echo "configure:4263: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4250,7 +4267,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include -#if HAVE_SYS_TYPES_H -# include -#endif - -#if HAVE_STDLIB_H -# include -#endif - -#if HAVE_SYS_STAT_H -# include -#endif - -#if HAVE_UNISTD_H -# include -#endif - /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -4403,7 +4407,7 @@ main() } EOF -if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4411: \"$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 @@ -4431,17 +4435,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:4435: checking for $ac_hdr" >&5 +echo "configure:4439: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4449: \"$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* @@ -4471,12 +4475,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4475: checking for $ac_func" >&5 +echo "configure:4479: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4507: \"$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 @@ -4528,12 +4532,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4532: checking for $ac_func" >&5 +echo "configure:4536: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4564: \"$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 @@ -4590,19 +4594,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:4594: checking for LC_MESSAGES" >&5 +echo "configure:4598: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4610: \"$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 @@ -4623,7 +4627,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:4627: checking whether NLS is requested" >&5 +echo "configure:4631: 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" @@ -4643,7 +4647,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:4647: checking whether included gettext is requested" >&5 +echo "configure:4651: 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" @@ -4662,17 +4666,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:4666: checking for libintl.h" >&5 +echo "configure:4670: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4680: \"$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* @@ -4689,19 +4693,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:4693: checking for gettext in libc" >&5 +echo "configure:4697: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4709: \"$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 @@ -4717,7 +4721,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:4721: checking for bindtextdomain in -lintl" >&5 +echo "configure:4725: 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 $ac_n "(cached) $ac_c" 1>&6 @@ -4725,7 +4729,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4744: \"$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 @@ -4752,19 +4756,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:4756: checking for gettext in libintl" >&5 +echo "configure:4760: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4772: \"$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 @@ -4792,7 +4796,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:4796: checking for $ac_word" >&5 +echo "configure:4800: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4826,12 +4830,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4830: checking for $ac_func" >&5 +echo "configure:4834: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4862: \"$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 @@ -4881,7 +4885,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:4885: checking for $ac_word" >&5 +echo "configure:4889: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4917,7 +4921,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:4921: checking for $ac_word" >&5 +echo "configure:4925: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4949,7 +4953,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4989,7 +4993,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:4993: checking for $ac_word" >&5 +echo "configure:4997: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5023,7 +5027,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:5027: checking for $ac_word" >&5 +echo "configure:5031: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5059,7 +5063,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:5063: checking for $ac_word" >&5 +echo "configure:5067: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5149,7 +5153,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:5153: checking for catalogs to be installed" >&5 +echo "configure:5157: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -5177,17 +5181,17 @@ echo "configure:5153: 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:5181: checking for linux/version.h" >&5 +echo "configure:5185: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5195: \"$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* @@ -5250,7 +5254,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:5254: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:5258: 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" @@ -5275,7 +5279,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:5279: checking for executable suffix" >&5 +echo "configure:5283: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5285,10 +5289,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:5289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -5310,17 +5314,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:5314: checking for $ac_hdr" >&5 +echo "configure:5318: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5328: \"$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* @@ -5350,7 +5354,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:5354: checking whether compiling a cross-assembler" >&5 +echo "configure:5358: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -5365,19 +5369,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:5369: checking for working alloca.h" >&5 +echo "configure:5373: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:5381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5385: \"$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 @@ -5398,12 +5402,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:5402: checking for alloca" >&5 +echo "configure:5406: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5439: \"$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 @@ -5463,12 +5467,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5467: checking whether alloca needs Cray hooks" >&5 +echo "configure:5471: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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:5497: checking for $ac_func" >&5 +echo "configure:5501: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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* eval "ac_cv_func_$ac_func=yes" else @@ -5548,7 +5552,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5552: checking stack direction for C alloca" >&5 +echo "configure:5556: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5556,7 +5560,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5583: \"$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 @@ -5597,21 +5601,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:5601: checking for inline" >&5 +echo "configure:5605: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -5641,12 +5645,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5645: checking for $ac_func" >&5 +echo "configure:5649: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5677: \"$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 @@ -5698,12 +5702,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5702: checking for $ac_func" >&5 +echo "configure:5706: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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* eval "ac_cv_func_$ac_func=yes" else @@ -5761,7 +5765,7 @@ case $host in ;; *-ncr-sysv4.3*) echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6 -echo "configure:5765: checking for _mwvalidcheckl in -lmw" >&5 +echo "configure:5769: checking for _mwvalidcheckl in -lmw" >&5 ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5769,7 +5773,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5788: \"$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 @@ -5801,7 +5805,7 @@ else fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5805: checking for main in -lm" >&5 +echo "configure:5809: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5809,14 +5813,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5824: \"$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 @@ -5839,7 +5843,7 @@ fi ;; *) echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5843: checking for main in -lm" >&5 +echo "configure:5847: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5847,14 +5851,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5862: \"$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 @@ -5885,12 +5889,12 @@ esac # 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:5889: checking for working assert macro" >&5 +echo "configure:5893: checking for working assert macro" >&5 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5906,7 +5910,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -5947,12 +5951,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:5951: checking whether declaration is required for strstr" >&5 +echo "configure:5955: checking whether declaration is required for strstr" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5971: \"$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 @@ -5984,12 +5988,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:5988: checking whether declaration is required for malloc" >&5 +echo "configure:5992: checking whether declaration is required for malloc" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6008: \"$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 @@ -6021,12 +6025,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:6025: checking whether declaration is required for free" >&5 +echo "configure:6029: checking whether declaration is required for free" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6045: \"$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 @@ -6058,12 +6062,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:6062: checking whether declaration is required for sbrk" >&5 +echo "configure:6066: checking whether declaration is required for sbrk" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6082: \"$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 @@ -6095,12 +6099,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:6099: checking whether declaration is required for environ" >&5 +echo "configure:6103: checking whether declaration is required for environ" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6119: \"$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 @@ -6135,12 +6139,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:6139: checking whether declaration is required for errno" >&5 +echo "configure:6143: checking whether declaration is required for errno" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6163: \"$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 c3467d776..b38f49b3a 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -449,12 +449,13 @@ changequote([,])dnl fmt=aout ;; vax-*-vms) fmt=vms ;; + w65-*-*) fmt=coff ;; + + xstormy16-*-*) fmt=elf bfd_gas=yes ;; z8k-*-coff | z8k-*-sim) fmt=coff ;; - w65-*-*) fmt=coff ;; - *-*-aout | *-*-scout) fmt=aout ;; *-*-freebsd*) fmt=elf em=freebsd bfd_gas=yes ;; @@ -570,6 +571,11 @@ changequote([,])dnl AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.]) fi ;; + + xstormy16) + using_cgen=yes + ;; + *) ;; esac diff --git a/gas/doc/Makefile.in b/gas/doc/Makefile.in index 3c32ddeed..7e161c61d 100644 --- a/gas/doc/Makefile.in +++ b/gas/doc/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am +# Makefile.in generated automatically by automake 1.4 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -129,6 +129,7 @@ TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl POD2MAN = pod2man --center="GNU Development Tools" \ --release="binutils-$(VERSION)" --section=1 + man_MANS = as.1 info_TEXINFOS = as.texinfo gasp.texi @@ -277,7 +278,7 @@ uninstall-info: else ii=; fi; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ - test -z "$$ii" \ + test -z "$ii" \ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done @$(NORMAL_UNINSTALL) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 0ad24bca8..61cee67c4 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,8 +1,26 @@ +<<<<<<< ChangeLog +2001-11-26 Geoffrey Keating + matthew green + + * gas/xstormy16/allinsn.d: New file. + * gas/xstormy16/allinsn.exp: New file. + * gas/xstormy16/allinsn.s: New file. + * gas/xstormy16/allinsn.sh: New file. + * gas/xstormy16/gcc.d: New file. + * gas/xstormy16/gcc.s: New file. + * gas/xstormy16/gcc.sh: New file. + * gas/xstormy16/reloc-1.d: New file. + * gas/xstormy16/reloc-1.s: New file. + * gas/xstormy16/reloc-2.d: New file. + * gas/xstormy16/reloc-2.s: New file. + +======= 2001-12-08 Alan Modra * gas/all/incbin.s: Add spaces before directives. * gas/all/incbin.d: Update. +>>>>>>> 1.255 Fri Dec 7 09:16:07 2001 Jeffrey A Law (law@cygnus.com) * gas/hppa/parse/linesepbug.s: Restore to its original form, diff --git a/gas/testsuite/gas/xstormy16/allinsn.d b/gas/testsuite/gas/xstormy16/allinsn.d new file mode 100644 index 000000000..e566a9aae --- /dev/null +++ b/gas/testsuite/gas/xstormy16/allinsn.d @@ -0,0 +1,1222 @@ +#as: +#objdump: -dr +#name: allinsn + +.*: +file format .* + +Disassembly of section \.text: + +00000000 : + 0: 00 78 00 00 mov\.b 0x0,#0x0 + 4: ff 79 ff ff mov\.w 0xff,#0xffff + 8: 80 79 00 80 mov\.w 0x80,#0x8000 + c: 7f 78 ff 7f mov\.b 0x7f,#0x7fff + 10: 01 79 01 00 mov\.w 0x1,#0x1 + 14: 51 79 a9 fc mov\.w 0x51,#0xfca9 + 18: f7 79 f6 a4 mov\.w 0xf7,#0xa4f6 + 1c: 54 78 07 41 mov\.b 0x54,#0x4107 + +00000020 : + 20: 00 7a 00 00 mov\.b 0x7f00,#0x0 + 24: ff 7b ff ff mov\.w 0x7fff,#0xffff + 28: 80 7b 00 80 mov\.w 0x7f80,#0x8000 + 2c: 7f 7a ff 7f mov\.b 0x7f7f,#0x7fff + 30: 01 7b 01 00 mov\.w 0x7f01,#0x1 + 34: a5 7a 98 07 mov\.b 0x7fa5,#0x798 + 38: ba 7b fd 2c mov\.w 0x7fba,#0x2cfd + 3c: 3f 7a d4 63 mov\.b 0x7f3f,#0x63d4 + +00000040 : + 40: 00 80 mov\.b r0,0x0 + 42: ff 8f mov\.w r7,0xff + 44: 80 89 mov\.w r4,0x80 + 46: 7f 86 mov\.b r3,0x7f + 48: 01 83 mov\.w r1,0x1 + 4a: b3 8d mov\.w r6,0xb3 + 4c: b7 81 mov\.w r0,0xb7 + 4e: 29 86 mov\.b r3,0x29 + +00000050 : + 50: 00 a0 mov\.b r0,0x7f00 + 52: ff af mov\.w r7,0x7fff + 54: 80 a9 mov\.w r4,0x7f80 + 56: 7f a6 mov\.b r3,0x7f7f + 58: 01 a3 mov\.w r1,0x7f01 + 5a: 72 a4 mov\.b r2,0x7f72 + 5c: d2 a5 mov\.w r2,0x7fd2 + 5e: b5 ab mov\.w r5,0x7fb5 + +00000060 : + 60: 00 90 mov\.b 0x0,r0 + 62: ff 9f mov\.w 0xff,r7 + 64: 80 99 mov\.w 0x80,r4 + 66: 7f 96 mov\.b 0x7f,r3 + 68: 01 93 mov\.w 0x1,r1 + 6a: 89 91 mov\.w 0x89,r0 + 6c: 1a 91 mov\.w 0x1a,r0 + 6e: 7f 98 mov\.b 0x7f,r4 + +00000070 : + 70: 00 b0 mov\.b 0x7f00,r0 + 72: ff bf mov\.w 0x7fff,r7 + 74: 80 b9 mov\.w 0x7f80,r4 + 76: 7f b6 mov\.b 0x7f7f,r3 + 78: 01 b3 mov\.w 0x7f01,r1 + 7a: 62 b7 mov\.w 0x7f62,r3 + 7c: 87 bf mov\.w 0x7f87,r7 + 7e: e5 b4 mov\.b 0x7fe5,r2 + +00000080 : + 80: 00 70 mov\.b r0,\(r0\) + 82: f7 71 mov\.w r7,\(r15\) + 84: 84 71 mov\.w r4,\(r8\) + 86: 73 70 mov\.b r3,\(r7\) + 88: 11 71 mov\.w r1,\(r1\) + 8a: 46 71 mov\.w r6,\(r4\) + 8c: c0 70 mov\.b r0,\(r12\) + 8e: 95 71 mov\.w r5,\(r9\) + +00000090 : + 90: 00 60 mov\.b r0,\(r0\+\+\) + 92: f7 61 mov\.w r7,\(r15\+\+\) + 94: 84 61 mov\.w r4,\(r8\+\+\) + 96: 73 60 mov\.b r3,\(r7\+\+\) + 98: 11 61 mov\.w r1,\(r1\+\+\) + 9a: 84 61 mov\.w r4,\(r8\+\+\) + 9c: c3 61 mov\.w r3,\(r12\+\+\) + 9e: 46 60 mov\.b r6,\(r4\+\+\) + +000000a0 : + a0: 00 68 mov\.b r0,\(--r0\) + a2: f7 69 mov\.w r7,\(--r15\) + a4: 84 69 mov\.w r4,\(--r8\) + a6: 73 68 mov\.b r3,\(--r7\) + a8: 11 69 mov\.w r1,\(--r1\) + aa: 95 69 mov\.w r5,\(--r9\) + ac: e4 69 mov\.w r4,\(--r14\) + ae: 74 68 mov\.b r4,\(--r7\) + +000000b0 : + b0: 00 72 mov\.b \(r0\),r0 + b2: f7 73 mov\.w \(r15\),r7 + b4: 84 73 mov\.w \(r8\),r4 + b6: 73 72 mov\.b \(r7\),r3 + b8: 11 73 mov\.w \(r1\),r1 + ba: 43 73 mov\.w \(r4\),r3 + bc: 36 72 mov\.b \(r3\),r6 + be: 70 73 mov\.w \(r7\),r0 + +000000c0 : + c0: 00 62 mov\.b \(r0\+\+\),r0 + c2: f7 63 mov\.w \(r15\+\+\),r7 + c4: 84 63 mov\.w \(r8\+\+\),r4 + c6: 73 62 mov\.b \(r7\+\+\),r3 + c8: 11 63 mov\.w \(r1\+\+\),r1 + ca: c5 63 mov\.w \(r12\+\+\),r5 + cc: 42 62 mov\.b \(r4\+\+\),r2 + ce: b6 62 mov\.b \(r11\+\+\),r6 + +000000d0 : + d0: 00 6a mov\.b \(--r0\),r0 + d2: f7 6b mov\.w \(--r15\),r7 + d4: 84 6b mov\.w \(--r8\),r4 + d6: 73 6a mov\.b \(--r7\),r3 + d8: 11 6b mov\.w \(--r1\),r1 + da: 83 6a mov\.b \(--r8\),r3 + dc: b4 6a mov\.b \(--r11\),r4 + de: 16 6b mov\.w \(--r1\),r6 + +000000e0 : + e0: 08 70 00 00 mov\.b r0,\(r0,0\) + e4: ff 71 ff 0f mov\.w r7,\(r15,-1\) + e8: 8c 71 00 08 mov\.w r4,\(r8,-2048\) + ec: 7b 70 ff 07 mov\.b r3,\(r7,2047\) + f0: 19 71 01 00 mov\.w r1,\(r1,1\) + f4: 8e 71 3c 0e mov\.w r6,\(r8,-452\) + f8: bc 71 3c 02 mov\.w r4,\(r11,572\) + fc: 19 70 4a 09 mov\.b r1,\(r1,-1718\) + +00000100 : + 100: 08 60 00 00 mov\.b r0,\(r0\+\+,0\) + 104: ff 61 ff 0f mov\.w r7,\(r15\+\+,-1\) + 108: 8c 61 00 08 mov\.w r4,\(r8\+\+,-2048\) + 10c: 7b 60 ff 07 mov\.b r3,\(r7\+\+,2047\) + 110: 19 61 01 00 mov\.w r1,\(r1\+\+,1\) + 114: 0e 61 c0 0f mov\.w r6,\(r0\+\+,-64\) + 118: ff 60 24 04 mov\.b r7,\(r15\+\+,1060\) + 11c: 78 60 4f 03 mov\.b r0,\(r7\+\+,847\) + +00000120 : + 120: 08 68 00 00 mov\.b r0,\(--r0,0\) + 124: ff 69 ff 0f mov\.w r7,\(--r15,-1\) + 128: 8c 69 00 08 mov\.w r4,\(--r8,-2048\) + 12c: 7b 68 ff 07 mov\.b r3,\(--r7,2047\) + 130: 19 69 01 00 mov\.w r1,\(--r1,1\) + 134: f8 69 f4 06 mov\.w r0,\(--r15,1780\) + 138: 1e 69 e2 05 mov\.w r6,\(--r1,1506\) + 13c: 3f 69 0f 08 mov\.w r7,\(--r3,-2033\) + +00000140 : + 140: 08 72 00 00 mov\.b \(r0,0\),r0 + 144: ff 73 ff 0f mov\.w \(r15,-1\),r7 + 148: 8c 73 00 08 mov\.w \(r8,-2048\),r4 + 14c: 7b 72 ff 07 mov\.b \(r7,2047\),r3 + 150: 19 73 01 00 mov\.w \(r1,1\),r1 + 154: 7d 73 9c 07 mov\.w \(r7,1948\),r5 + 158: 3c 72 b4 0c mov\.b \(r3,-844\),r4 + 15c: f8 73 a8 06 mov\.w \(r15,1704\),r0 + +00000160 : + 160: 08 62 00 00 mov\.b \(r0\+\+,0\),r0 + 164: ff 63 ff 0f mov\.w \(r15\+\+,-1\),r7 + 168: 8c 63 00 08 mov\.w \(r8\+\+,-2048\),r4 + 16c: 7b 62 ff 07 mov\.b \(r7\+\+,2047\),r3 + 170: 19 63 01 00 mov\.w \(r1\+\+,1\),r1 + 174: 2f 63 50 0f mov\.w \(r2\+\+,-176\),r7 + 178: 8c 63 6d 05 mov\.w \(r8\+\+,1389\),r4 + 17c: 38 62 2f 00 mov\.b \(r3\+\+,47\),r0 + +00000180 : + 180: 08 6a 00 00 mov\.b \(--r0,0\),r0 + 184: ff 6b ff 0f mov\.w \(--r15,-1\),r7 + 188: 8c 6b 00 08 mov\.w \(--r8,-2048\),r4 + 18c: 7b 6a ff 07 mov\.b \(--r7,2047\),r3 + 190: 19 6b 01 00 mov\.w \(--r1,1\),r1 + 194: 8c 6a ec 03 mov\.b \(--r8,1004\),r4 + 198: ea 6b 5c 0a mov\.w \(--r14,-1444\),r2 + 19c: 5c 6a 61 0c mov\.b \(--r5,-927\),r4 + +000001a0 : + 1a0: 00 46 mov r0,r0 + 1a2: ff 46 mov r15,r15 + 1a4: 88 46 mov r8,r8 + 1a6: 77 46 mov r7,r7 + 1a8: 11 46 mov r1,r1 + 1aa: e9 46 mov r9,r14 + 1ac: f7 46 mov r7,r15 + 1ae: fc 46 mov r12,r15 + +000001b0 : + 1b0: 00 47 mov Rx,#0x0 + 1b2: ff 47 mov Rx,#0xff + 1b4: 80 47 mov Rx,#0x80 + 1b6: 7f 47 mov Rx,#0x7f + 1b8: 01 47 mov Rx,#0x1 + 1ba: 88 47 mov Rx,#0x88 + 1bc: 53 47 mov Rx,#0x53 + 1be: 68 47 mov Rx,#0x68 + +000001c0 : + 1c0: 00 47 mov Rx,#0x0 + 1c2: ff 47 mov Rx,#0xff + 1c4: 80 47 mov Rx,#0x80 + 1c6: 7f 47 mov Rx,#0x7f + 1c8: 01 47 mov Rx,#0x1 + 1ca: 5c 47 mov Rx,#0x5c + 1cc: 61 47 mov Rx,#0x61 + 1ce: 04 47 mov Rx,#0x4 + +000001d0 : + 1d0: 00 21 mov r0,#0x0 + 1d2: ff 2f mov r7,#0xff + 1d4: 80 29 mov r4,#0x80 + 1d6: 7f 27 mov r3,#0x7f + 1d8: 01 23 mov r1,#0x1 + 1da: ce 25 mov r2,#0xce + 1dc: 37 29 mov r4,#0x37 + 1de: 03 25 mov r2,#0x3 + +000001e0 : + 1e0: 00 21 mov r0,#0x0 + 1e2: ff 2f mov r7,#0xff + 1e4: 80 29 mov r4,#0x80 + 1e6: 7f 27 mov r3,#0x7f + 1e8: 01 23 mov r1,#0x1 + 1ea: f3 29 mov r4,#0xf3 + 1ec: 37 27 mov r3,#0x37 + 1ee: 6c 25 mov r2,#0x6c + +000001f0 : + 1f0: 00 21 mov r0,#0x0 + 1f2: 3f 31 ff ff mov r15,#0xffff + 1f6: 38 31 00 80 mov r8,#0x8000 + 1fa: 37 31 ff 7f mov r7,#0x7fff + 1fe: 01 23 mov r1,#0x1 + 200: 34 31 62 4e mov r4,#0x4e62 + 204: 33 31 16 1c mov r3,#0x1c16 + 208: 32 31 64 3e mov r2,#0x3e64 + +0000020c : + 20c: 00 21 mov r0,#0x0 + 20e: 3f 31 ff ff mov r15,#0xffff + 212: 38 31 00 80 mov r8,#0x8000 + 216: 37 31 ff 7f mov r7,#0x7fff + 21a: 01 23 mov r1,#0x1 + 21c: 36 31 08 41 mov r6,#0x4108 + 220: 38 31 f1 68 mov r8,#0x68f1 + 224: 3a 31 2a 4e mov r10,#0x4e2a + +00000228 : + 228: c0 30 mov\.b r0,RxL + 22a: cf 30 mov\.b r15,RxL + 22c: c8 30 mov\.b r8,RxL + 22e: c7 30 mov\.b r7,RxL + 230: c1 30 mov\.b r1,RxL + 232: cb 30 mov\.b r11,RxL + 234: c5 30 mov\.b r5,RxL + 236: c2 30 mov\.b r2,RxL + +00000238 : + 238: d0 30 mov\.b r0,RxH + 23a: df 30 mov\.b r15,RxH + 23c: d8 30 mov\.b r8,RxH + 23e: d7 30 mov\.b r7,RxH + 240: d1 30 mov\.b r1,RxH + 242: d2 30 mov\.b r2,RxH + 244: d7 30 mov\.b r7,RxH + 246: d2 30 mov\.b r2,RxH + +00000248 : + 248: 00 74 movf\.b r0,\(r0\) + 24a: f7 75 movf\.w r7,\(r15\) + 24c: 84 75 movf\.w r4,\(r8\) + 24e: 73 74 movf\.b r3,\(r7\) + 250: 11 75 movf\.w r1,\(r1\) + 252: f6 74 movf\.b r6,\(r15\) + 254: a1 74 movf\.b r1,\(r10\) + 256: 16 74 movf\.b r6,\(r1\) + +00000258 : + 258: 00 64 movf\.b r0,\(r0\+\+\) + 25a: f7 65 movf\.w r7,\(r15\+\+\) + 25c: 84 65 movf\.w r4,\(r8\+\+\) + 25e: 73 64 movf\.b r3,\(r7\+\+\) + 260: 11 65 movf\.w r1,\(r1\+\+\) + 262: 52 64 movf\.b r2,\(r5\+\+\) + 264: a5 65 movf\.w r5,\(r10\+\+\) + 266: 57 65 movf\.w r7,\(r5\+\+\) + +00000268 : + 268: 00 6c movf\.b r0,\(--r0\) + 26a: f7 6d movf\.w r7,\(--r15\) + 26c: 84 6d movf\.w r4,\(--r8\) + 26e: 73 6c movf\.b r3,\(--r7\) + 270: 11 6d movf\.w r1,\(--r1\) + 272: a6 6d movf\.w r6,\(--r10\) + 274: e1 6c movf\.b r1,\(--r14\) + 276: 73 6d movf\.w r3,\(--r7\) + +00000278 : + 278: 00 76 movf\.b \(r0\),r0 + 27a: f7 77 movf\.w \(r15\),r7 + 27c: 84 77 movf\.w \(r8\),r4 + 27e: 73 76 movf\.b \(r7\),r3 + 280: 11 77 movf\.w \(r1\),r1 + 282: 54 76 movf\.b \(r5\),r4 + 284: 34 76 movf\.b \(r3\),r4 + 286: c3 77 movf\.w \(r12\),r3 + +00000288 : + 288: 00 66 movf\.b \(r0\+\+\),r0 + 28a: f7 67 movf\.w \(r15\+\+\),r7 + 28c: 84 67 movf\.w \(r8\+\+\),r4 + 28e: 73 66 movf\.b \(r7\+\+\),r3 + 290: 11 67 movf\.w \(r1\+\+\),r1 + 292: 95 66 movf\.b \(r9\+\+\),r5 + 294: a4 67 movf\.w \(r10\+\+\),r4 + 296: 91 66 movf\.b \(r9\+\+\),r1 + +00000298 : + 298: 00 6e movf\.b \(--r0\),r0 + 29a: f7 6f movf\.w \(--r15\),r7 + 29c: 84 6f movf\.w \(--r8\),r4 + 29e: 73 6e movf\.b \(--r7\),r3 + 2a0: 11 6f movf\.w \(--r1\),r1 + 2a2: 02 6e movf\.b \(--r0\),r2 + 2a4: b2 6f movf\.w \(--r11\),r2 + 2a6: a5 6e movf\.b \(--r10\),r5 + +000002a8 : + 2a8: 08 74 00 00 movf\.b r0,\(r0,r0,0\) + 2ac: ff 75 ff 7f movf\.w r7,\(r7,r15,-1\) + 2b0: 8c 75 00 48 movf\.w r4,\(r4,r8,-2048\) + 2b4: 7b 74 ff 37 movf\.b r3,\(r3,r7,2047\) + 2b8: 19 75 01 10 movf\.w r1,\(r1,r1,1\) + 2bc: 0f 74 c1 75 movf\.b r7,\(r7,r0,1473\) + 2c0: 9a 75 0e 0a movf\.w r2,\(r0,r9,-1522\) + 2c4: 1a 75 e0 51 movf\.w r2,\(r5,r1,480\) + +000002c8 : + 2c8: 08 64 00 00 movf\.b r0,\(r0,r0\+\+,0\) + 2cc: ff 65 ff 7f movf\.w r7,\(r7,r15\+\+,-1\) + 2d0: 8c 65 00 48 movf\.w r4,\(r4,r8\+\+,-2048\) + 2d4: 7b 64 ff 37 movf\.b r3,\(r3,r7\+\+,2047\) + 2d8: 19 65 01 10 movf\.w r1,\(r1,r1\+\+,1\) + 2dc: 29 64 76 05 movf\.b r1,\(r0,r2\+\+,1398\) + 2e0: 9c 65 f6 0c movf\.w r4,\(r0,r9\+\+,-778\) + 2e4: e9 65 1c 56 movf\.w r1,\(r5,r14\+\+,1564\) + +000002e8 : + 2e8: 08 6c 00 00 movf\.b r0,\(r0,--r0,0\) + 2ec: ff 6d ff 7f movf\.w r7,\(r7,--r15,-1\) + 2f0: 8c 6d 00 48 movf\.w r4,\(r4,--r8,-2048\) + 2f4: 7b 6c ff 37 movf\.b r3,\(r3,--r7,2047\) + 2f8: 19 6d 01 10 movf\.w r1,\(r1,--r1,1\) + 2fc: 7e 6c fe 00 movf\.b r6,\(r0,--r7,254\) + 300: cd 6d 89 46 movf\.w r5,\(r4,--r12,1673\) + 304: a8 6c da 0f movf\.b r0,\(r0,--r10,-38\) + +00000308 : + 308: 08 76 00 00 movf\.b \(r0,r0,0\),r0 + 30c: ff 77 ff 7f movf\.w \(r7,r15,-1\),r7 + 310: 8c 77 00 48 movf\.w \(r4,r8,-2048\),r4 + 314: 7b 76 ff 37 movf\.b \(r3,r7,2047\),r3 + 318: 19 77 01 10 movf\.w \(r1,r1,1\),r1 + 31c: 2b 77 9c 79 movf\.w \(r7,r2,-1636\),r3 + 320: c9 77 5a 66 movf\.w \(r6,r12,1626\),r1 + 324: e8 76 04 36 movf\.b \(r3,r14,1540\),r0 + +00000328 : + 328: 08 66 00 00 movf\.b \(r0,r0\+\+,0\),r0 + 32c: ff 67 ff 7f movf\.w \(r7,r15\+\+,-1\),r7 + 330: 8c 67 00 48 movf\.w \(r4,r8\+\+,-2048\),r4 + 334: 7b 66 ff 37 movf\.b \(r3,r7\+\+,2047\),r3 + 338: 19 67 01 10 movf\.w \(r1,r1\+\+,1\),r1 + 33c: db 66 d2 71 movf\.b \(r7,r13\+\+,466\),r3 + 340: bc 66 fa 30 movf\.b \(r3,r11\+\+,250\),r4 + 344: af 66 38 2a movf\.b \(r2,r10\+\+,-1480\),r7 + +00000348 : + 348: 08 6e 00 00 movf\.b \(r0,--r0,0\),r0 + 34c: ff 6f ff 7f movf\.w \(r7,--r15,-1\),r7 + 350: 8c 6f 00 48 movf\.w \(r4,--r8,-2048\),r4 + 354: 7b 6e ff 37 movf\.b \(r3,--r7,2047\),r3 + 358: 19 6f 01 10 movf\.w \(r1,--r1,1\),r1 + 35c: a8 6e a0 5d movf\.b \(r5,--r10,-608\),r0 + 360: bf 6e 3f 13 movf\.b \(r1,--r11,831\),r7 + 364: fe 6f 0c 78 movf\.w \(r7,--r15,-2036\),r6 + +00000368 : + 368: 00 33 mask r0,r0 + 36a: ff 33 mask r15,r15 + 36c: 88 33 mask r8,r8 + 36e: 77 33 mask r7,r7 + 370: 11 33 mask r1,r1 + 372: 04 33 mask r4,r0 + 374: b6 33 mask r6,r11 + 376: 48 33 mask r8,r4 + +00000378 : + 378: e0 30 00 00 mask r0,#0x0 + 37c: ef 30 ff ff mask r15,#0xffff + 380: e8 30 00 80 mask r8,#0x8000 + 384: e7 30 ff 7f mask r7,#0x7fff + 388: e1 30 01 00 mask r1,#0x1 + 38c: e7 30 e9 46 mask r7,#0x46e9 + 390: ef 30 64 1d mask r15,#0x1d64 + 394: ee 30 2d 86 mask r14,#0x862d + +00000398 : + 398: 80 00 push r0 + 39a: 8f 00 push r15 + 39c: 88 00 push r8 + 39e: 87 00 push r7 + 3a0: 81 00 push r1 + 3a2: 89 00 push r9 + 3a4: 84 00 push r4 + 3a6: 83 00 push r3 + +000003a8 : + 3a8: 90 00 pop r0 + 3aa: 9f 00 pop r15 + 3ac: 98 00 pop r8 + 3ae: 97 00 pop r7 + 3b0: 91 00 pop r1 + 3b2: 93 00 pop r3 + 3b4: 92 00 pop r2 + 3b6: 9c 00 pop r12 + +000003b8 : + 3b8: 90 30 swpn r0 + 3ba: 9f 30 swpn r15 + 3bc: 98 30 swpn r8 + 3be: 97 30 swpn r7 + 3c0: 91 30 swpn r1 + 3c2: 9f 30 swpn r15 + 3c4: 94 30 swpn r4 + 3c6: 93 30 swpn r3 + +000003c8 : + 3c8: 80 30 swpb r0 + 3ca: 8f 30 swpb r15 + 3cc: 88 30 swpb r8 + 3ce: 87 30 swpb r7 + 3d0: 81 30 swpb r1 + 3d2: 82 30 swpb r2 + 3d4: 8c 30 swpb r12 + 3d6: 82 30 swpb r2 + +000003d8 : + 3d8: 00 32 swpw r0,r0 + 3da: ff 32 swpw r15,r15 + 3dc: 88 32 swpw r8,r8 + 3de: 77 32 swpw r7,r7 + 3e0: 11 32 swpw r1,r1 + 3e2: 4c 32 swpw r12,r4 + 3e4: 28 32 swpw r8,r2 + 3e6: d5 32 swpw r5,r13 + +000003e8 : + 3e8: 00 40 and r0,r0 + 3ea: ff 40 and r15,r15 + 3ec: 88 40 and r8,r8 + 3ee: 77 40 and r7,r7 + 3f0: 11 40 and r1,r1 + 3f2: 22 40 and r2,r2 + 3f4: 5f 40 and r15,r5 + 3f6: 57 40 and r7,r5 + +000003f8 : + 3f8: 00 41 and Rx,#0x0 + 3fa: ff 41 and Rx,#0xff + 3fc: 80 41 and Rx,#0x80 + 3fe: 7f 41 and Rx,#0x7f + 400: 01 41 and Rx,#0x1 + 402: ce 41 and Rx,#0xce + 404: 0b 41 and Rx,#0xb + 406: e8 41 and Rx,#0xe8 + +00000408 : + 408: 00 31 00 00 and r0,#0x0 + 40c: 0f 31 ff ff and r15,#0xffff + 410: 08 31 00 80 and r8,#0x8000 + 414: 07 31 ff 7f and r7,#0x7fff + 418: 01 31 01 00 and r1,#0x1 + 41c: 0a 31 4d 43 and r10,#0x434d + 420: 0b 31 0b f0 and r11,#0xf00b + 424: 05 31 4d b7 and r5,#0xb74d + +00000428 : + 428: 00 42 or r0,r0 + 42a: ff 42 or r15,r15 + 42c: 88 42 or r8,r8 + 42e: 77 42 or r7,r7 + 430: 11 42 or r1,r1 + 432: 53 42 or r3,r5 + 434: fe 42 or r14,r15 + 436: c5 42 or r5,r12 + +00000438 : + 438: 00 43 or Rx,#0x0 + 43a: ff 43 or Rx,#0xff + 43c: 80 43 or Rx,#0x80 + 43e: 7f 43 or Rx,#0x7f + 440: 01 43 or Rx,#0x1 + 442: 04 43 or Rx,#0x4 + 444: 26 43 or Rx,#0x26 + 446: 34 43 or Rx,#0x34 + +00000448 : + 448: 10 31 00 00 or r0,#0x0 + 44c: 1f 31 ff ff or r15,#0xffff + 450: 18 31 00 80 or r8,#0x8000 + 454: 17 31 ff 7f or r7,#0x7fff + 458: 11 31 01 00 or r1,#0x1 + 45c: 12 31 33 fc or r2,#0xfc33 + 460: 12 31 db 47 or r2,#0x47db + 464: 11 31 53 f6 or r1,#0xf653 + +00000468 : + 468: 00 44 xor r0,r0 + 46a: ff 44 xor r15,r15 + 46c: 88 44 xor r8,r8 + 46e: 77 44 xor r7,r7 + 470: 11 44 xor r1,r1 + 472: 1e 44 xor r14,r1 + 474: 99 44 xor r9,r9 + 476: 8c 44 xor r12,r8 + +00000478 : + 478: 00 45 xor Rx,#0x0 + 47a: ff 45 xor Rx,#0xff + 47c: 80 45 xor Rx,#0x80 + 47e: 7f 45 xor Rx,#0x7f + 480: 01 45 xor Rx,#0x1 + 482: d0 45 xor Rx,#0xd0 + 484: 7e 45 xor Rx,#0x7e + 486: 37 45 xor Rx,#0x37 + +00000488 : + 488: 20 31 00 00 xor r0,#0x0 + 48c: 2f 31 ff ff xor r15,#0xffff + 490: 28 31 00 80 xor r8,#0x8000 + 494: 27 31 ff 7f xor r7,#0x7fff + 498: 21 31 01 00 xor r1,#0x1 + 49c: 2f 31 75 dc xor r15,#0xdc75 + 4a0: 23 31 85 03 xor r3,#0x385 + 4a4: 22 31 99 90 xor r2,#0x9099 + +000004a8 : + 4a8: b0 30 not r0 + 4aa: bf 30 not r15 + 4ac: b8 30 not r8 + 4ae: b7 30 not r7 + 4b0: b1 30 not r1 + 4b2: b4 30 not r4 + 4b4: b3 30 not r3 + 4b6: b3 30 not r3 + +000004b8 : + 4b8: 00 49 add r0,r0 + 4ba: ff 49 add r15,r15 + 4bc: 88 49 add r8,r8 + 4be: 77 49 add r7,r7 + 4c0: 11 49 add r1,r1 + 4c2: 7c 49 add r12,r7 + 4c4: a1 49 add r1,r10 + 4c6: ee 49 add r14,r14 + +000004c8 : + 4c8: 00 51 add r0,#0x0 + 4ca: ff 51 add r15,#0xf + 4cc: 88 51 add r8,#0x8 + 4ce: 77 51 add r7,#0x7 + 4d0: 11 51 add r1,#0x1 + 4d2: 07 51 add r7,#0x0 + 4d4: 9a 51 add r10,#0x9 + 4d6: 87 51 add r7,#0x8 + +000004d8 : + 4d8: 00 59 add Rx,#0x0 + 4da: ff 59 add Rx,#0xff + 4dc: 80 59 add Rx,#0x80 + 4de: 7f 59 add Rx,#0x7f + 4e0: 01 59 add Rx,#0x1 + 4e2: 19 59 add Rx,#0x19 + 4e4: f7 59 add Rx,#0xf7 + 4e6: dd 59 add Rx,#0xdd + +000004e8 : + 4e8: 00 51 add r0,#0x0 + 4ea: 4f 31 ff 00 add r15,#0xff + 4ee: 48 31 80 00 add r8,#0x80 + 4f2: 47 31 7f 00 add r7,#0x7f + 4f6: 11 51 add r1,#0x1 + 4f8: 43 31 63 00 add r3,#0x63 + 4fc: f0 51 add r0,#0xf + 4fe: 47 31 d6 00 add r7,#0xd6 + +00000502 : + 502: 00 4b adc r0,r0 + 504: ff 4b adc r15,r15 + 506: 88 4b adc r8,r8 + 508: 77 4b adc r7,r7 + 50a: 11 4b adc r1,r1 + 50c: d2 4b adc r2,r13 + 50e: ae 4b adc r14,r10 + 510: f2 4b adc r2,r15 + +00000512 : + 512: 00 53 adc r0,#0x0 + 514: ff 53 adc r15,#0xf + 516: 88 53 adc r8,#0x8 + 518: 77 53 adc r7,#0x7 + 51a: 11 53 adc r1,#0x1 + 51c: 1f 53 adc r15,#0x1 + 51e: 31 53 adc r1,#0x3 + 520: b6 53 adc r6,#0xb + +00000522 : + 522: 00 5b adc Rx,#0x0 + 524: ff 5b adc Rx,#0xff + 526: 80 5b adc Rx,#0x80 + 528: 7f 5b adc Rx,#0x7f + 52a: 01 5b adc Rx,#0x1 + 52c: e1 5b adc Rx,#0xe1 + 52e: 4b 5b adc Rx,#0x4b + 530: 12 5b adc Rx,#0x12 + +00000532 : + 532: 00 53 adc r0,#0x0 + 534: 5f 31 ff ff adc r15,#0xffff + 538: 58 31 00 80 adc r8,#0x8000 + 53c: 57 31 ff 7f adc r7,#0x7fff + 540: 11 53 adc r1,#0x1 + 542: 5d 31 99 f6 adc r13,#0xf699 + 546: 53 31 f3 5c adc r3,#0x5cf3 + 54a: 5b 31 5d c0 adc r11,#0xc05d + +0000054e : + 54e: 00 4d sub r0,r0 + 550: ff 4d sub r15,r15 + 552: 88 4d sub r8,r8 + 554: 77 4d sub r7,r7 + 556: 11 4d sub r1,r1 + 558: 88 4d sub r8,r8 + 55a: 99 4d sub r9,r9 + 55c: f9 4d sub r9,r15 + +0000055e : + 55e: 00 55 sub r0,#0x0 + 560: ff 55 sub r15,#0xf + 562: 88 55 sub r8,#0x8 + 564: 77 55 sub r7,#0x7 + 566: 11 55 sub r1,#0x1 + 568: f2 55 sub r2,#0xf + 56a: 9c 55 sub r12,#0x9 + 56c: 48 55 sub r8,#0x4 + +0000056e : + 56e: 00 5d sub Rx,#0x0 + 570: ff 5d sub Rx,#0xff + 572: 80 5d sub Rx,#0x80 + 574: 7f 5d sub Rx,#0x7f + 576: 01 5d sub Rx,#0x1 + 578: cd 5d sub Rx,#0xcd + 57a: 99 5d sub Rx,#0x99 + 57c: d9 5d sub Rx,#0xd9 + +0000057e : + 57e: 00 55 sub r0,#0x0 + 580: 6f 31 ff ff sub r15,#0xffff + 584: 68 31 00 80 sub r8,#0x8000 + 588: 67 31 ff 7f sub r7,#0x7fff + 58c: 11 55 sub r1,#0x1 + 58e: 63 31 b7 ca sub r3,#0xcab7 + 592: 6b 31 41 5c sub r11,#0x5c41 + 596: 6a 31 4a 1e sub r10,#0x1e4a + +0000059a : + 59a: 00 4f sbc r0,r0 + 59c: ff 4f sbc r15,r15 + 59e: 88 4f sbc r8,r8 + 5a0: 77 4f sbc r7,r7 + 5a2: 11 4f sbc r1,r1 + 5a4: 2b 4f sbc r11,r2 + 5a6: 19 4f sbc r9,r1 + 5a8: f4 4f sbc r4,r15 + +000005aa : + 5aa: 00 57 sbc r0,#0x0 + 5ac: ff 57 sbc r15,#0xf + 5ae: 88 57 sbc r8,#0x8 + 5b0: 77 57 sbc r7,#0x7 + 5b2: 11 57 sbc r1,#0x1 + 5b4: ba 57 sbc r10,#0xb + 5b6: ab 57 sbc r11,#0xa + 5b8: ad 57 sbc r13,#0xa + +000005ba : + 5ba: 00 5f sbc Rx,#0x0 + 5bc: ff 5f sbc Rx,#0xff + 5be: 80 5f sbc Rx,#0x80 + 5c0: 7f 5f sbc Rx,#0x7f + 5c2: 01 5f sbc Rx,#0x1 + 5c4: 89 5f sbc Rx,#0x89 + 5c6: e0 5f sbc Rx,#0xe0 + 5c8: 9c 5f sbc Rx,#0x9c + +000005ca : + 5ca: 00 57 sbc r0,#0x0 + 5cc: 7f 31 ff ff sbc r15,#0xffff + 5d0: 78 31 00 80 sbc r8,#0x8000 + 5d4: 77 31 ff 7f sbc r7,#0x7fff + 5d8: 11 57 sbc r1,#0x1 + 5da: 70 31 fb 7e sbc r0,#0x7efb + 5de: 77 31 a2 21 sbc r7,#0x21a2 + 5e2: 7e 31 95 4f sbc r14,#0x4f95 + +000005e6 : + 5e6: 00 30 inc r0 + 5e8: 0f 30 inc r15 + 5ea: 08 30 inc r8 + 5ec: 07 30 inc r7 + 5ee: 01 30 inc r1 + 5f0: 0d 30 inc r13 + 5f2: 01 30 inc r1 + 5f4: 0b 30 inc r11 + +000005f6 : + 5f6: 00 30 inc r0 + 5f8: 3f 30 inc r15,#0x3 + 5fa: 28 30 inc r8,#0x2 + 5fc: 17 30 inc r7,#0x1 + 5fe: 11 30 inc r1,#0x1 + 600: 1e 30 inc r14,#0x1 + 602: 05 30 inc r5 + 604: 3c 30 inc r12,#0x3 + +00000606 : + 606: 40 30 dec r0 + 608: 4f 30 dec r15 + 60a: 48 30 dec r8 + 60c: 47 30 dec r7 + 60e: 41 30 dec r1 + 610: 4c 30 dec r12 + 612: 48 30 dec r8 + 614: 4a 30 dec r10 + +00000616 : + 616: 40 30 dec r0 + 618: 7f 30 dec r15,#0x3 + 61a: 68 30 dec r8,#0x2 + 61c: 57 30 dec r7,#0x1 + 61e: 51 30 dec r1,#0x1 + 620: 45 30 dec r5 + 622: 4d 30 dec r13 + 624: 6d 30 dec r13,#0x2 + +00000626 : + 626: 00 38 rrc r0,r0 + 628: ff 38 rrc r15,r15 + 62a: 88 38 rrc r8,r8 + 62c: 77 38 rrc r7,r7 + 62e: 11 38 rrc r1,r1 + 630: 48 38 rrc r8,r4 + 632: ea 38 rrc r10,r14 + 634: 9f 38 rrc r15,r9 + +00000636 : + 636: 00 39 rrc r0,#0x0 + 638: ff 39 rrc r15,#0xf + 63a: 88 39 rrc r8,#0x8 + 63c: 77 39 rrc r7,#0x7 + 63e: 11 39 rrc r1,#0x1 + 640: 3b 39 rrc r11,#0x3 + 642: ce 39 rrc r14,#0xc + 644: f2 39 rrc r2,#0xf + +00000646 : + 646: 00 3a rlc r0,r0 + 648: ff 3a rlc r15,r15 + 64a: 88 3a rlc r8,r8 + 64c: 77 3a rlc r7,r7 + 64e: 11 3a rlc r1,r1 + 650: 3f 3a rlc r15,r3 + 652: 7f 3a rlc r15,r7 + 654: af 3a rlc r15,r10 + +00000656 : + 656: 00 3b rlc r0,#0x0 + 658: ff 3b rlc r15,#0xf + 65a: 88 3b rlc r8,#0x8 + 65c: 77 3b rlc r7,#0x7 + 65e: 11 3b rlc r1,#0x1 + 660: 28 3b rlc r8,#0x2 + 662: 62 3b rlc r2,#0x6 + 664: a6 3b rlc r6,#0xa + +00000666 : + 666: 00 3c shr r0,r0 + 668: ff 3c shr r15,r15 + 66a: 88 3c shr r8,r8 + 66c: 77 3c shr r7,r7 + 66e: 11 3c shr r1,r1 + 670: 2d 3c shr r13,r2 + 672: 87 3c shr r7,r8 + 674: 86 3c shr r6,r8 + +00000676 : + 676: 00 3d shr r0,#0x0 + 678: ff 3d shr r15,#0xf + 67a: 88 3d shr r8,#0x8 + 67c: 77 3d shr r7,#0x7 + 67e: 11 3d shr r1,#0x1 + 680: d9 3d shr r9,#0xd + 682: 72 3d shr r2,#0x7 + 684: 88 3d shr r8,#0x8 + +00000686 : + 686: 00 3e shl r0,r0 + 688: ff 3e shl r15,r15 + 68a: 88 3e shl r8,r8 + 68c: 77 3e shl r7,r7 + 68e: 11 3e shl r1,r1 + 690: 32 3e shl r2,r3 + 692: 30 3e shl r0,r3 + 694: 12 3e shl r2,r1 + +00000696 : + 696: 00 3f shl r0,#0x0 + 698: ff 3f shl r15,#0xf + 69a: 88 3f shl r8,#0x8 + 69c: 77 3f shl r7,#0x7 + 69e: 11 3f shl r1,#0x1 + 6a0: d6 3f shl r6,#0xd + 6a2: 63 3f shl r3,#0x6 + 6a4: ff 3f shl r15,#0xf + +000006a6 : + 6a6: 00 36 asr r0,r0 + 6a8: ff 36 asr r15,r15 + 6aa: 88 36 asr r8,r8 + 6ac: 77 36 asr r7,r7 + 6ae: 11 36 asr r1,r1 + 6b0: a5 36 asr r5,r10 + 6b2: 53 36 asr r3,r5 + 6b4: b6 36 asr r6,r11 + +000006b6 : + 6b6: 00 37 asr r0,#0x0 + 6b8: ff 37 asr r15,#0xf + 6ba: 88 37 asr r8,#0x8 + 6bc: 77 37 asr r7,#0x7 + 6be: 11 37 asr r1,#0x1 + 6c0: 4d 37 asr r13,#0x4 + 6c2: d0 37 asr r0,#0xd + 6c4: 36 37 asr r6,#0x3 + +000006c6 : + 6c6: 00 09 set1 r0,#0x0 + 6c8: ff 09 set1 r15,#0xf + 6ca: 88 09 set1 r8,#0x8 + 6cc: 77 09 set1 r7,#0x7 + 6ce: 11 09 set1 r1,#0x1 + 6d0: a6 09 set1 r6,#0xa + 6d2: 1d 09 set1 r13,#0x1 + 6d4: fd 09 set1 r13,#0xf + +000006d6 : + 6d6: 00 0b set1 r0,r0 + 6d8: ff 0b set1 r15,r15 + 6da: 88 0b set1 r8,r8 + 6dc: 77 0b set1 r7,r7 + 6de: 11 0b set1 r1,r1 + 6e0: 06 0b set1 r6,r0 + 6e2: 76 0b set1 r6,r7 + 6e4: 2e 0b set1 r14,r2 + +000006e6 : + 6e6: 00 e1 set1 0x0,#0x0 + 6e8: ff ef set1 0xff,#0x7 + 6ea: 80 e9 set1 0x80,#0x4 + 6ec: 7f e7 set1 0x7f,#0x3 + 6ee: 01 e3 set1 0x1,#0x1 + 6f0: f4 e7 set1 0xf4,#0x3 + 6f2: 37 ef set1 0x37,#0x7 + 6f4: fc eb set1 0xfc,#0x5 + +000006f6 : + 6f6: 00 f1 set1 0x7f00,#0x0 + 6f8: ff ff set1 0x7fff,#0x7 + 6fa: 80 f9 set1 0x7f80,#0x4 + 6fc: 7f f7 set1 0x7f7f,#0x3 + 6fe: 01 f3 set1 0x7f01,#0x1 + 700: 0a f7 set1 0x7f0a,#0x3 + 702: 63 f9 set1 0x7f63,#0x4 + 704: 94 f7 set1 0x7f94,#0x3 + +00000706 : + 706: 00 08 clr1 r0,#0x0 + 708: ff 08 clr1 r15,#0xf + 70a: 88 08 clr1 r8,#0x8 + 70c: 77 08 clr1 r7,#0x7 + 70e: 11 08 clr1 r1,#0x1 + 710: 0c 08 clr1 r12,#0x0 + 712: b8 08 clr1 r8,#0xb + 714: 77 08 clr1 r7,#0x7 + +00000716 : + 716: 00 0a clr1 r0,r0 + 718: ff 0a clr1 r15,r15 + 71a: 88 0a clr1 r8,r8 + 71c: 77 0a clr1 r7,r7 + 71e: 11 0a clr1 r1,r1 + 720: 33 0a clr1 r3,r3 + 722: 10 0a clr1 r0,r1 + 724: 0f 0a clr1 r15,r0 + +00000726 : + 726: 00 e0 clr1 0x0,#0x0 + 728: ff ee clr1 0xff,#0x7 + 72a: 80 e8 clr1 0x80,#0x4 + 72c: 7f e6 clr1 0x7f,#0x3 + 72e: 01 e2 clr1 0x1,#0x1 + 730: 72 ee clr1 0x72,#0x7 + 732: e5 e8 clr1 0xe5,#0x4 + 734: 56 e2 clr1 0x56,#0x1 + +00000736 : + 736: 00 f0 clr1 0x7f00,#0x0 + 738: ff fe clr1 0x7fff,#0x7 + 73a: 80 f8 clr1 0x7f80,#0x4 + 73c: 7f f6 clr1 0x7f7f,#0x3 + 73e: 01 f2 clr1 0x7f01,#0x1 + 740: 2c f6 clr1 0x7f2c,#0x3 + 742: d4 fa clr1 0x7fd4,#0x5 + 744: 43 fe clr1 0x7f43,#0x7 + +00000746 : + 746: a0 30 cbw r0 + 748: af 30 cbw r15 + 74a: a8 30 cbw r8 + 74c: a7 30 cbw r7 + 74e: a1 30 cbw r1 + 750: a8 30 cbw r8 + 752: ab 30 cbw r11 + 754: a3 30 cbw r3 + +00000756 : + 756: f0 30 rev r0 + 758: ff 30 rev r15 + 75a: f8 30 rev r8 + 75c: f7 30 rev r7 + 75e: f1 30 rev r1 + 760: f1 30 rev r1 + 762: f1 30 rev r1 + 764: fe 30 rev r14 + +00000766 : + 766: 20 00 br r0 + 768: 2f 00 br r15 + 76a: 28 00 br r8 + 76c: 27 00 br r7 + 76e: 21 00 br r1 + 770: 20 00 br r0 + 772: 2f 00 br r15 + 774: 2c 00 br r12 + +00000776 : + 776: 40 00 jmp r8,r0 + 778: 5f 00 jmp r9,r15 + 77a: 58 00 jmp r9,r8 + 77c: 47 00 jmp r8,r7 + 77e: 51 00 jmp r9,r1 + 780: 57 00 jmp r9,r7 + 782: 55 00 jmp r9,r5 + 784: 4c 00 jmp r8,r12 + +00000786 : + 786: 00 02 00 00 jmpf 0x0 + 78a: ff 02 ff ff jmpf 0xffffff + 78e: 00 02 00 80 jmpf 0x800000 + 792: ff 02 ff 7f jmpf 0x7fffff + 796: 01 02 00 00 jmpf 0x1 + 79a: 6d 02 c0 a3 jmpf 0xa3c06d + 79e: 52 02 54 e6 jmpf 0xe65452 + 7a2: d8 02 56 16 jmpf 0x1656d8 + +000007a6 : + 7a6: 10 00 callr r0 + 7a8: 1f 00 callr r15 + 7aa: 18 00 callr r8 + 7ac: 17 00 callr r7 + 7ae: 11 00 callr r1 + 7b0: 11 00 callr r1 + 7b2: 1c 00 callr r12 + 7b4: 18 00 callr r8 + +000007b6 : + 7b6: a0 00 call r8,r0 + 7b8: bf 00 call r9,r15 + 7ba: b8 00 call r9,r8 + 7bc: a7 00 call r8,r7 + 7be: b1 00 call r9,r1 + 7c0: b6 00 call r9,r6 + 7c2: be 00 call r9,r14 + 7c4: ac 00 call r8,r12 + +000007c6 : + 7c6: 00 01 00 00 callf 0x0 + 7ca: ff 01 ff ff callf 0xffffff + 7ce: 00 01 00 80 callf 0x800000 + 7d2: ff 01 ff 7f callf 0x7fffff + 7d6: 01 01 00 00 callf 0x1 + 7da: 56 01 b2 ce callf 0xceb256 + 7de: df 01 5f a5 callf 0xa55fdf + 7e2: b3 01 e6 e7 callf 0xe7e6b3 + +000007e6 : + 7e6: 30 00 icallr r0 + 7e8: 3f 00 icallr r15 + 7ea: 38 00 icallr r8 + 7ec: 37 00 icallr r7 + 7ee: 31 00 icallr r1 + 7f0: 3f 00 icallr r15 + 7f2: 3c 00 icallr r12 + 7f4: 39 00 icallr r9 + +000007f6 : + 7f6: 60 00 icall r8,r0 + 7f8: 7f 00 icall r9,r15 + 7fa: 78 00 icall r9,r8 + 7fc: 67 00 icall r8,r7 + 7fe: 71 00 icall r9,r1 + 800: 7a 00 icall r9,r10 + 802: 6f 00 icall r8,r15 + 804: 6a 00 icall r8,r10 + +00000806 : + 806: 00 03 00 00 icallf 0x0 + 80a: ff 03 ff ff icallf 0xffffff + 80e: 00 03 00 80 icallf 0x800000 + 812: ff 03 ff 7f icallf 0x7fffff + 816: 01 03 00 00 icallf 0x1 + 81a: 22 03 3f 93 icallf 0x933f22 + 81e: 6e 03 35 1e icallf 0x1e356e + 822: 48 03 e8 74 icallf 0x74e848 + +00000826 : + 826: 02 00 iret + +00000828 : + 828: 03 00 ret + +0000082a : + 82a: d0 00 mul + +0000082c
: + 82c: c0 00 div + +0000082e : + 82e: 00 00 nop + 830: 03 00 ret + +00000832 : + 832: 08 00 halt + +00000834 : + 834: 0a 00 hold + +00000836 : + 836: 05 00 brk + +00000838 : + 838: 00 0d 00 00 bge r0,r0,0x83c + 83c: ff 0d ff ff bz r15,r15,0x83f + 840: 88 0d 00 88 bpl r8,r8,0x44 + 844: 77 0d ff 77 bls r7,r7,0x1047 + 848: 11 0d 01 10 bnc r1,r1,0x84d + 84c: d3 0d 07 37 bc r3,r13,0xf57 + 850: a1 0d 1d 08 bge r1,r10,0x71 + 854: 50 0d 94 fb bz r0,r5,0x3ec + +00000858 : + 858: 00 20 00 00 bge r0,#0x0,0x85c + 85c: ff 2e ff ff bz r7,#0xff,0x85f + 860: 80 28 00 88 bpl r4,#0x80,0x64 + 864: 7f 26 ff 77 bls r3,#0x7f,0x1067 + 868: 01 22 01 10 bnc r1,#0x1,0x86d + 86c: 08 26 c1 15 bnc r3,#0x8,0xe31 + 870: cb 2a 53 c6 bnz\.b r5,#0xcb,0xec7 + 874: e1 2e d2 33 bc r7,#0xe1,0xc4a + +00000878 : + 878: 00 c0 00 00 bge Rx,#0x0,0x87c + 87c: ff cf ff ff bz Rx,#0xffff,0x87f + 880: 80 c8 00 80 bpl Rx,#0x8000,0x804 + 884: 7f c7 ff 7f bls Rx,#0x7fff,0x907 + 888: 01 c1 01 00 bnc Rx,#0x1,0x88d + 88c: 04 ce fb 77 bz\.b Rx,#0x77fb,0x894 + 890: f3 c9 3a f3 bnv Rx,#0xf33a,0x887 + 894: 6c c9 32 bc bnv Rx,#0xbc32,0x904 + +00000898 : + 898: 00 04 00 00 bn r0,#0x0,0x89c + 89c: ff 04 ff 0f bn r15,#0xf,0x89f + 8a0: 88 04 00 08 bn r8,#0x8,0xa4 + 8a4: 77 04 ff 07 bn r7,#0x7,0x10a7 + 8a8: 11 04 01 00 bn r1,#0x1,0x8ad + 8ac: 3b 04 49 08 bn r11,#0x3,0xf9 + 8b0: 4f 04 4b 0b bn r15,#0x4,0x3ff + 8b4: 8a 04 9b 06 bn r10,#0x8,0xf53 + +000008b8 : + 8b8: 00 06 00 00 bn r0,r0,0x8bc + 8bc: ff 06 ff 0f bn r15,r15,0x8bf + 8c0: 88 06 00 08 bn r8,r8,0xc4 + 8c4: 77 06 ff 07 bn r7,r7,0x10c7 + 8c8: 11 06 01 00 bn r1,r1,0x8cd + 8cc: 34 06 9d 04 bn r4,r3,0xd6d + 8d0: 25 06 4d 00 bn r5,r2,0x921 + 8d4: 73 06 77 02 bn r3,r7,0xb4f + +000008d8 : + 8d8: 00 7c 00 00 bn 0x0,#0x0,0x8dc + 8dc: ff 7c ff 7f bn 0xff,#0x7,0x8df + 8e0: 80 7c 00 48 bn 0x80,#0x4,0xe4 + 8e4: 7f 7c ff 37 bn 0x7f,#0x3,0x10e7 + 8e8: 01 7c 01 10 bn 0x1,#0x1,0x8ed + 8ec: 99 7c b1 7c bn 0x99,#0x7,0x5a1 + 8f0: cc 7c a7 08 bn 0xcc,#0x0,0x19b + 8f4: f2 7c 74 75 bn 0xf2,#0x7,0xe6c + +000008f8 : + 8f8: 00 7e 00 00 bn 0x7f00,#0x0,0x8fc + 8fc: ff 7e ff 7f bn 0x7fff,#0x7,0x8ff + 900: 80 7e 00 48 bn 0x7f80,#0x4,0x104 + 904: 7f 7e ff 37 bn 0x7f7f,#0x3,0x1107 + 908: 01 7e 01 10 bn 0x7f01,#0x1,0x90d + 90c: b9 7e 9a 3d bn 0x7fb9,#0x3,0x6aa + 910: 69 7e 64 1d bn 0x7f69,#0x1,0x678 + 914: 4f 7e 20 75 bn 0x7f4f,#0x7,0xe38 + +00000918 : + 918: 00 05 00 00 bp r0,#0x0,0x91c + 91c: ff 05 ff 0f bp r15,#0xf,0x91f + 920: 88 05 00 08 bp r8,#0x8,0x124 + 924: 77 05 ff 07 bp r7,#0x7,0x1127 + 928: 11 05 01 00 bp r1,#0x1,0x92d + 92c: c0 05 33 04 bp r0,#0xc,0xd63 + 930: 51 05 27 02 bp r1,#0x5,0xb5b + 934: 86 05 34 06 bp r6,#0x8,0xf6c + +00000938 : + 938: 00 07 00 00 bp r0,r0,0x93c + 93c: ff 07 ff 0f bp r15,r15,0x93f + 940: 88 07 00 08 bp r8,r8,0x144 + 944: 77 07 ff 07 bp r7,r7,0x1147 + 948: 11 07 01 00 bp r1,r1,0x94d + 94c: 94 07 9a 0d bp r4,r9,0x6ea + 950: a9 07 b0 0a bp r9,r10,0x404 + 954: 14 07 97 01 bp r4,r1,0xaef + +00000958 : + 958: 00 7d 00 00 bp 0x0,#0x0,0x95c + 95c: ff 7d ff 7f bp 0xff,#0x7,0x95f + 960: 80 7d 00 48 bp 0x80,#0x4,0x164 + 964: 7f 7d ff 37 bp 0x7f,#0x3,0x1167 + 968: 01 7d 01 10 bp 0x1,#0x1,0x96d + 96c: c1 7d 72 3e bp 0xc1,#0x3,0x7e2 + 970: fa 7d ef 29 bp 0xfa,#0x2,0x363 + 974: b4 7d 43 62 bp 0xb4,#0x6,0xbbb + +00000978 : + 978: 00 7f 00 00 bp 0x7f00,#0x0,0x97c + 97c: ff 7f ff 7f bp 0x7fff,#0x7,0x97f + 980: 80 7f 00 48 bp 0x7f80,#0x4,0x184 + 984: 7f 7f ff 37 bp 0x7f7f,#0x3,0x1187 + 988: 01 7f 01 10 bp 0x7f01,#0x1,0x98d + 98c: c3 7f 50 1e bp 0x7fc3,#0x1,0x7e0 + 990: 81 7f 1c 5a bp 0x7f81,#0x5,0x3b0 + 994: 38 7f bb 36 bp 0x7f38,#0x3,0x1053 + +00000998 : + 998: 00 d0 bge 0x99a + 99a: ff df bz 0x99b + 99c: 80 d8 bpl 0x91e + 99e: 7f d7 bls 0xa1f + 9a0: 01 d1 bnc 0x9a3 + 9a2: 30 dc bnz\.b 0x9d4 + 9a4: f9 d1 bnc 0x99f + 9a6: 4a dc bnz\.b 0x9f2 + +000009a8
: + 9a8: 00 10 br 0x9aa + 9aa: fe 1f br 0x9aa + 9ac: 00 18 br 0x1ae + 9ae: fe 17 br 0x11ae + 9b0: 00 10 br 0x9b2 + 9b2: c0 15 br 0xf74 + 9b4: 52 16 br 0x1008 + 9b6: d2 13 br 0xd8a + +000009b8 : + 9b8: 01 10 callr 0x9ba + 9ba: ff 1f callr 0x9ba + 9bc: 01 18 callr 0x1be + 9be: ff 17 callr 0x11be + 9c0: 01 10 callr 0x9c2 + 9c2: c1 15 callr 0xf84 + 9c4: 53 16 callr 0x1018 + 9c6: d3 13 callr 0xd9a diff --git a/gas/testsuite/gas/xstormy16/allinsn.exp b/gas/testsuite/gas/xstormy16/allinsn.exp new file mode 100644 index 000000000..f48dcc540 --- /dev/null +++ b/gas/testsuite/gas/xstormy16/allinsn.exp @@ -0,0 +1,8 @@ +# XSTORMY16 assembler testsuite. -*- Tcl -*- + +if [istarget xstormy16*-*-*] { + run_dump_test "allinsn" + run_dump_test "reloc-1" + run_dump_test "reloc-2" + run_dump_test "gcc" +} diff --git a/gas/testsuite/gas/xstormy16/allinsn.s b/gas/testsuite/gas/xstormy16/allinsn.s new file mode 100644 index 000000000..f00aa6f98 --- /dev/null +++ b/gas/testsuite/gas/xstormy16/allinsn.s @@ -0,0 +1,1346 @@ + .data +foodata: .word 42 + .text +footext: + .text + .global movlmemimm +movlmemimm: + mov.b 0,#0 + mov.w 255,#65535 + mov.w 128,#32768 + mov.b 127,#32767 + mov.w 1,#1 + mov.w 81,#64681 + mov.w 247,#42230 + mov.b 84,#16647 + .text + .global movhmemimm +movhmemimm: + mov.b 0x7f00+0,#0 + mov.w 0x7f00+255,#65535 + mov.w 0x7f00+128,#32768 + mov.b 0x7f00+127,#32767 + mov.w 0x7f00+1,#1 + mov.b 0x7f00+165,#1944 + mov.w 0x7f00+186,#11517 + mov.b 0x7f00+63,#25556 + .text + .global movlgrmem +movlgrmem: + mov.b r0,0 + mov.w r7,255 + mov.w r4,128 + mov.b r3,127 + mov.w r1,1 + mov.w r6,179 + mov.w r0,183 + mov.b r3,41 + .text + .global movhgrmem +movhgrmem: + mov.b r0,0x7f00+0 + mov.w r7,0x7f00+255 + mov.w r4,0x7f00+128 + mov.b r3,0x7f00+127 + mov.w r1,0x7f00+1 + mov.b r2,0x7f00+114 + mov.w r2,0x7f00+210 + mov.w r5,0x7f00+181 + .text + .global movlmemgr +movlmemgr: + mov.b 0,r0 + mov.w 255,r7 + mov.w 128,r4 + mov.b 127,r3 + mov.w 1,r1 + mov.w 137,r0 + mov.w 26,r0 + mov.b 127,r4 + .text + .global movhmemgr +movhmemgr: + mov.b 0x7f00+0,r0 + mov.w 0x7f00+255,r7 + mov.w 0x7f00+128,r4 + mov.b 0x7f00+127,r3 + mov.w 0x7f00+1,r1 + mov.w 0x7f00+98,r3 + mov.w 0x7f00+135,r7 + mov.b 0x7f00+229,r2 + .text + .global movgrgri +movgrgri: + mov.b r0,(r0) + mov.w r7,(r15) + mov.w r4,(r8) + mov.b r3,(r7) + mov.w r1,(r1) + mov.w r6,(r4) + mov.b r0,(r12) + mov.w r5,(r9) + .text + .global movgrgripostinc +movgrgripostinc: + mov.b r0,(r0++) + mov.w r7,(r15++) + mov.w r4,(r8++) + mov.b r3,(r7++) + mov.w r1,(r1++) + mov.w r4,(r8++) + mov.w r3,(r12++) + mov.b r6,(r4++) + .text + .global movgrgripredec +movgrgripredec: + mov.b r0,(--r0) + mov.w r7,(--r15) + mov.w r4,(--r8) + mov.b r3,(--r7) + mov.w r1,(--r1) + mov.w r5,(--r9) + mov.w r4,(--r14) + mov.b r4,(--r7) + .text + .global movgrigr +movgrigr: + mov.b (r0),r0 + mov.w (r15),r7 + mov.w (r8),r4 + mov.b (r7),r3 + mov.w (r1),r1 + mov.w (r4),r3 + mov.b (r3),r6 + mov.w (r7),r0 + .text + .global movgripostincgr +movgripostincgr: + mov.b (r0++),r0 + mov.w (r15++),r7 + mov.w (r8++),r4 + mov.b (r7++),r3 + mov.w (r1++),r1 + mov.w (r12++),r5 + mov.b (r4++),r2 + mov.b (r11++),r6 + .text + .global movgripredecgr +movgripredecgr: + mov.b (--r0),r0 + mov.w (--r15),r7 + mov.w (--r8),r4 + mov.b (--r7),r3 + mov.w (--r1),r1 + mov.b (--r8),r3 + mov.b (--r11),r4 + mov.w (--r1),r6 + .text + .global movgrgrii +movgrgrii: + mov.b r0,(r0,0) + mov.w r7,(r15,-1) + mov.w r4,(r8,-2048) + mov.b r3,(r7,2047) + mov.w r1,(r1,1) + mov.w r6,(r8,-452) + mov.w r4,(r11,572) + mov.b r1,(r1,-1718) + .text + .global movgrgriipostinc +movgrgriipostinc: + mov.b r0,(r0++,0) + mov.w r7,(r15++,-1) + mov.w r4,(r8++,-2048) + mov.b r3,(r7++,2047) + mov.w r1,(r1++,1) + mov.w r6,(r0++,-64) + mov.b r7,(r15++,1060) + mov.b r0,(r7++,847) + .text + .global movgrgriipredec +movgrgriipredec: + mov.b r0,(--r0,0) + mov.w r7,(--r15,-1) + mov.w r4,(--r8,-2048) + mov.b r3,(--r7,2047) + mov.w r1,(--r1,1) + mov.w r0,(--r15,1780) + mov.w r6,(--r1,1506) + mov.w r7,(--r3,-2033) + .text + .global movgriigr +movgriigr: + mov.b (r0,0),r0 + mov.w (r15,-1),r7 + mov.w (r8,-2048),r4 + mov.b (r7,2047),r3 + mov.w (r1,1),r1 + mov.w (r7,1948),r5 + mov.b (r3,-844),r4 + mov.w (r15,1704),r0 + .text + .global movgriipostincgr +movgriipostincgr: + mov.b (r0++,0),r0 + mov.w (r15++,-1),r7 + mov.w (r8++,-2048),r4 + mov.b (r7++,2047),r3 + mov.w (r1++,1),r1 + mov.w (r2++,-176),r7 + mov.w (r8++,1389),r4 + mov.b (r3++,47),r0 + .text + .global movgriipredecgr +movgriipredecgr: + mov.b (--r0,0),r0 + mov.w (--r15,-1),r7 + mov.w (--r8,-2048),r4 + mov.b (--r7,2047),r3 + mov.w (--r1,1),r1 + mov.b (--r8,1004),r4 + mov.w (--r14,-1444),r2 + mov.b (--r5,-927),r4 + .text + .global movgrgr +movgrgr: + mov r0,r0 + mov r15,r15 + mov r8,r8 + mov r7,r7 + mov r1,r1 + mov r9,r14 + mov r7,r15 + mov r12,r15 + .text + .global movimm8 +movimm8: + mov Rx,#0 + mov Rx,#255 + mov Rx,#128 + mov Rx,#127 + mov Rx,#1 + mov Rx,#136 + mov Rx,#83 + mov Rx,#104 + .text + .global movwimm8 +movwimm8: + mov.w Rx,#0 + mov.w Rx,#255 + mov.w Rx,#128 + mov.w Rx,#127 + mov.w Rx,#1 + mov.w Rx,#92 + mov.w Rx,#97 + mov.w Rx,#4 + .text + .global movgrimm8 +movgrimm8: + mov r0,#0 + mov r7,#255 + mov r4,#128 + mov r3,#127 + mov r1,#1 + mov r2,#206 + mov r4,#55 + mov r2,#3 + .text + .global movwgrimm8 +movwgrimm8: + mov.w r0,#0 + mov.w r7,#255 + mov.w r4,#128 + mov.w r3,#127 + mov.w r1,#1 + mov.w r4,#243 + mov.w r3,#55 + mov.w r2,#108 + .text + .global movgrimm16 +movgrimm16: + mov r0,#0 + mov r15,#65535 + mov r8,#32768 + mov r7,#32767 + mov r1,#1 + mov r4,#20066 + mov r3,#7190 + mov r2,#15972 + .text + .global movwgrimm16 +movwgrimm16: + mov.w r0,#0 + mov.w r15,#65535 + mov.w r8,#32768 + mov.w r7,#32767 + mov.w r1,#1 + mov.w r6,#16648 + mov.w r8,#26865 + mov.w r10,#20010 + .text + .global movlowgr +movlowgr: + mov.b r0,RxL + mov.b r15,RxL + mov.b r8,RxL + mov.b r7,RxL + mov.b r1,RxL + mov.b r11,RxL + mov.b r5,RxL + mov.b r2,RxL + .text + .global movhighgr +movhighgr: + mov.b r0,RxH + mov.b r15,RxH + mov.b r8,RxH + mov.b r7,RxH + mov.b r1,RxH + mov.b r2,RxH + mov.b r7,RxH + mov.b r2,RxH + .text + .global movfgrgri +movfgrgri: + movf.b r0,(r0) + movf.w r7,(r15) + movf.w r4,(r8) + movf.b r3,(r7) + movf.w r1,(r1) + movf.b r6,(r15) + movf.b r1,(r10) + movf.b r6,(r1) + .text + .global movfgrgripostinc +movfgrgripostinc: + movf.b r0,(r0++) + movf.w r7,(r15++) + movf.w r4,(r8++) + movf.b r3,(r7++) + movf.w r1,(r1++) + movf.b r2,(r5++) + movf.w r5,(r10++) + movf.w r7,(r5++) + .text + .global movfgrgripredec +movfgrgripredec: + movf.b r0,(--r0) + movf.w r7,(--r15) + movf.w r4,(--r8) + movf.b r3,(--r7) + movf.w r1,(--r1) + movf.w r6,(--r10) + movf.b r1,(--r14) + movf.w r3,(--r7) + .text + .global movfgrigr +movfgrigr: + movf.b (r0),r0 + movf.w (r15),r7 + movf.w (r8),r4 + movf.b (r7),r3 + movf.w (r1),r1 + movf.b (r5),r4 + movf.b (r3),r4 + movf.w (r12),r3 + .text + .global movfgripostincgr +movfgripostincgr: + movf.b (r0++),r0 + movf.w (r15++),r7 + movf.w (r8++),r4 + movf.b (r7++),r3 + movf.w (r1++),r1 + movf.b (r9++),r5 + movf.w (r10++),r4 + movf.b (r9++),r1 + .text + .global movfgripredecgr +movfgripredecgr: + movf.b (--r0),r0 + movf.w (--r15),r7 + movf.w (--r8),r4 + movf.b (--r7),r3 + movf.w (--r1),r1 + movf.b (--r0),r2 + movf.w (--r11),r2 + movf.b (--r10),r5 + .text + .global movfgrgrii +movfgrgrii: + movf.b r0,(r0,r0,0) + movf.w r7,(r7,r15,-1) + movf.w r4,(r4,r8,-2048) + movf.b r3,(r3,r7,2047) + movf.w r1,(r1,r1,1) + movf.b r7,(r7,r0,1473) + movf.w r2,(r0,r9,-1522) + movf.w r2,(r5,r1,480) + .text + .global movfgrgriipostinc +movfgrgriipostinc: + movf.b r0,(r0,r0++,0) + movf.w r7,(r7,r15++,-1) + movf.w r4,(r4,r8++,-2048) + movf.b r3,(r3,r7++,2047) + movf.w r1,(r1,r1++,1) + movf.b r1,(r0,r2++,1398) + movf.w r4,(r0,r9++,-778) + movf.w r1,(r5,r14++,1564) + .text + .global movfgrgriipredec +movfgrgriipredec: + movf.b r0,(r0,--r0,0) + movf.w r7,(r7,--r15,-1) + movf.w r4,(r4,--r8,-2048) + movf.b r3,(r3,--r7,2047) + movf.w r1,(r1,--r1,1) + movf.b r6,(r0,--r7,254) + movf.w r5,(r4,--r12,1673) + movf.b r0,(r0,--r10,-38) + .text + .global movfgriigr +movfgriigr: + movf.b (r0,r0,0),r0 + movf.w (r7,r15,-1),r7 + movf.w (r4,r8,-2048),r4 + movf.b (r3,r7,2047),r3 + movf.w (r1,r1,1),r1 + movf.w (r7,r2,-1636),r3 + movf.w (r6,r12,1626),r1 + movf.b (r3,r14,1540),r0 + .text + .global movfgriipostincgr +movfgriipostincgr: + movf.b (r0,r0++,0),r0 + movf.w (r7,r15++,-1),r7 + movf.w (r4,r8++,-2048),r4 + movf.b (r3,r7++,2047),r3 + movf.w (r1,r1++,1),r1 + movf.b (r7,r13++,466),r3 + movf.b (r3,r11++,250),r4 + movf.b (r2,r10++,-1480),r7 + .text + .global movfgriipredecgr +movfgriipredecgr: + movf.b (r0,--r0,0),r0 + movf.w (r7,--r15,-1),r7 + movf.w (r4,--r8,-2048),r4 + movf.b (r3,--r7,2047),r3 + movf.w (r1,--r1,1),r1 + movf.b (r5,--r10,-608),r0 + movf.b (r1,--r11,831),r7 + movf.w (r7,--r15,-2036),r6 + .text + .global maskgrgr +maskgrgr: + mask r0,r0 + mask r15,r15 + mask r8,r8 + mask r7,r7 + mask r1,r1 + mask r4,r0 + mask r6,r11 + mask r8,r4 + .text + .global maskgrimm16 +maskgrimm16: + mask r0,#0 + mask r15,#65535 + mask r8,#32768 + mask r7,#32767 + mask r1,#1 + mask r7,#18153 + mask r15,#7524 + mask r14,#34349 + .text + .global pushgr +pushgr: + push r0 + push r15 + push r8 + push r7 + push r1 + push r9 + push r4 + push r3 + .text + .global popgr +popgr: + pop r0 + pop r15 + pop r8 + pop r7 + pop r1 + pop r3 + pop r2 + pop r12 + .text + .global swpn +swpn: + swpn r0 + swpn r15 + swpn r8 + swpn r7 + swpn r1 + swpn r15 + swpn r4 + swpn r3 + .text + .global swpb +swpb: + swpb r0 + swpb r15 + swpb r8 + swpb r7 + swpb r1 + swpb r2 + swpb r12 + swpb r2 + .text + .global swpw +swpw: + swpw r0,r0 + swpw r15,r15 + swpw r8,r8 + swpw r7,r7 + swpw r1,r1 + swpw r12,r4 + swpw r8,r2 + swpw r5,r13 + .text + .global andgrgr +andgrgr: + and r0,r0 + and r15,r15 + and r8,r8 + and r7,r7 + and r1,r1 + and r2,r2 + and r15,r5 + and r7,r5 + .text + .global andimm8 +andimm8: + and Rx,#0 + and Rx,#255 + and Rx,#128 + and Rx,#127 + and Rx,#1 + and Rx,#206 + and Rx,#11 + and Rx,#232 + .text + .global andgrimm16 +andgrimm16: + and r0,#0 + and r15,#65535 + and r8,#32768 + and r7,#32767 + and r1,#1 + and r10,#17229 + and r11,#61451 + and r5,#46925 + .text + .global orgrgr +orgrgr: + or r0,r0 + or r15,r15 + or r8,r8 + or r7,r7 + or r1,r1 + or r3,r5 + or r14,r15 + or r5,r12 + .text + .global orimm8 +orimm8: + or Rx,#0 + or Rx,#255 + or Rx,#128 + or Rx,#127 + or Rx,#1 + or Rx,#4 + or Rx,#38 + or Rx,#52 + .text + .global orgrimm16 +orgrimm16: + or r0,#0 + or r15,#65535 + or r8,#32768 + or r7,#32767 + or r1,#1 + or r2,#64563 + or r2,#18395 + or r1,#63059 + .text + .global xorgrgr +xorgrgr: + xor r0,r0 + xor r15,r15 + xor r8,r8 + xor r7,r7 + xor r1,r1 + xor r14,r1 + xor r9,r9 + xor r12,r8 + .text + .global xorimm8 +xorimm8: + xor Rx,#0 + xor Rx,#255 + xor Rx,#128 + xor Rx,#127 + xor Rx,#1 + xor Rx,#208 + xor Rx,#126 + xor Rx,#55 + .text + .global xorgrimm16 +xorgrimm16: + xor r0,#0 + xor r15,#65535 + xor r8,#32768 + xor r7,#32767 + xor r1,#1 + xor r15,#56437 + xor r3,#901 + xor r2,#37017 + .text + .global notgr +notgr: + not r0 + not r15 + not r8 + not r7 + not r1 + not r4 + not r3 + not r3 + .text + .global addgrgr +addgrgr: + add r0,r0 + add r15,r15 + add r8,r8 + add r7,r7 + add r1,r1 + add r12,r7 + add r1,r10 + add r14,r14 + .text + .global addgrimm4 +addgrimm4: + add r0,#0 + add r15,#15 + add r8,#8 + add r7,#7 + add r1,#1 + add r7,#0 + add r10,#9 + add r7,#8 + .text + .global addimm8 +addimm8: + add Rx,#0 + add Rx,#255 + add Rx,#128 + add Rx,#127 + add Rx,#1 + add Rx,#25 + add Rx,#247 + add Rx,#221 + .text + .global addgrimm16 +addgrimm16: + add r0,#0 + add r15,#255 + add r8,#128 + add r7,#127 + add r1,#1 + add r3,#99 + add r0,#15 + add r7,#214 + .text + .global adcgrgr +adcgrgr: + adc r0,r0 + adc r15,r15 + adc r8,r8 + adc r7,r7 + adc r1,r1 + adc r2,r13 + adc r14,r10 + adc r2,r15 + .text + .global adcgrimm4 +adcgrimm4: + adc r0,#0 + adc r15,#15 + adc r8,#8 + adc r7,#7 + adc r1,#1 + adc r15,#1 + adc r1,#3 + adc r6,#11 + .text + .global adcimm8 +adcimm8: + adc Rx,#0 + adc Rx,#255 + adc Rx,#128 + adc Rx,#127 + adc Rx,#1 + adc Rx,#225 + adc Rx,#75 + adc Rx,#18 + .text + .global adcgrimm16 +adcgrimm16: + adc r0,#0 + adc r15,#65535 + adc r8,#32768 + adc r7,#32767 + adc r1,#1 + adc r13,#63129 + adc r3,#23795 + adc r11,#49245 + .text + .global subgrgr +subgrgr: + sub r0,r0 + sub r15,r15 + sub r8,r8 + sub r7,r7 + sub r1,r1 + sub r8,r8 + sub r9,r9 + sub r9,r15 + .text + .global subgrimm4 +subgrimm4: + sub r0,#0 + sub r15,#15 + sub r8,#8 + sub r7,#7 + sub r1,#1 + sub r2,#15 + sub r12,#9 + sub r8,#4 + .text + .global subimm8 +subimm8: + sub Rx,#0 + sub Rx,#255 + sub Rx,#128 + sub Rx,#127 + sub Rx,#1 + sub Rx,#205 + sub Rx,#153 + sub Rx,#217 + .text + .global subgrimm16 +subgrimm16: + sub r0,#0 + sub r15,#65535 + sub r8,#32768 + sub r7,#32767 + sub r1,#1 + sub r3,#51895 + sub r11,#23617 + sub r10,#7754 + .text + .global sbcgrgr +sbcgrgr: + sbc r0,r0 + sbc r15,r15 + sbc r8,r8 + sbc r7,r7 + sbc r1,r1 + sbc r11,r2 + sbc r9,r1 + sbc r4,r15 + .text + .global sbcgrimm4 +sbcgrimm4: + sbc r0,#0 + sbc r15,#15 + sbc r8,#8 + sbc r7,#7 + sbc r1,#1 + sbc r10,#11 + sbc r11,#10 + sbc r13,#10 + .text + .global sbcgrimm8 +sbcgrimm8: + sbc Rx,#0 + sbc Rx,#255 + sbc Rx,#128 + sbc Rx,#127 + sbc Rx,#1 + sbc Rx,#137 + sbc Rx,#224 + sbc Rx,#156 + .text + .global sbcgrimm16 +sbcgrimm16: + sbc r0,#0 + sbc r15,#65535 + sbc r8,#32768 + sbc r7,#32767 + sbc r1,#1 + sbc r0,#32507 + sbc r7,#8610 + sbc r14,#20373 + .text + .global incgr +incgr: + inc r0 + inc r15 + inc r8 + inc r7 + inc r1 + inc r13 + inc r1 + inc r11 + .text + .global incgrimm2 +incgrimm2: + inc r0,#0 + inc r15,#3 + inc r8,#2 + inc r7,#1 + inc r1,#1 + inc r14,#1 + inc r5,#0 + inc r12,#3 + .text + .global decgr +decgr: + dec r0 + dec r15 + dec r8 + dec r7 + dec r1 + dec r12 + dec r8 + dec r10 + .text + .global decgrimm2 +decgrimm2: + dec r0,#0 + dec r15,#3 + dec r8,#2 + dec r7,#1 + dec r1,#1 + dec r5,#0 + dec r13,#0 + dec r13,#2 + .text + .global rrcgrgr +rrcgrgr: + rrc r0,r0 + rrc r15,r15 + rrc r8,r8 + rrc r7,r7 + rrc r1,r1 + rrc r8,r4 + rrc r10,r14 + rrc r15,r9 + .text + .global rrcgrimm4 +rrcgrimm4: + rrc r0,#0 + rrc r15,#15 + rrc r8,#8 + rrc r7,#7 + rrc r1,#1 + rrc r11,#3 + rrc r14,#12 + rrc r2,#15 + .text + .global rlcgrgr +rlcgrgr: + rlc r0,r0 + rlc r15,r15 + rlc r8,r8 + rlc r7,r7 + rlc r1,r1 + rlc r15,r3 + rlc r15,r7 + rlc r15,r10 + .text + .global rlcgrimm4 +rlcgrimm4: + rlc r0,#0 + rlc r15,#15 + rlc r8,#8 + rlc r7,#7 + rlc r1,#1 + rlc r8,#2 + rlc r2,#6 + rlc r6,#10 + .text + .global shrgrgr +shrgrgr: + shr r0,r0 + shr r15,r15 + shr r8,r8 + shr r7,r7 + shr r1,r1 + shr r13,r2 + shr r7,r8 + shr r6,r8 + .text + .global shrgrimm +shrgrimm: + shr r0,#0 + shr r15,#15 + shr r8,#8 + shr r7,#7 + shr r1,#1 + shr r9,#13 + shr r2,#7 + shr r8,#8 + .text + .global shlgrgr +shlgrgr: + shl r0,r0 + shl r15,r15 + shl r8,r8 + shl r7,r7 + shl r1,r1 + shl r2,r3 + shl r0,r3 + shl r2,r1 + .text + .global shlgrimm +shlgrimm: + shl r0,#0 + shl r15,#15 + shl r8,#8 + shl r7,#7 + shl r1,#1 + shl r6,#13 + shl r3,#6 + shl r15,#15 + .text + .global asrgrgr +asrgrgr: + asr r0,r0 + asr r15,r15 + asr r8,r8 + asr r7,r7 + asr r1,r1 + asr r5,r10 + asr r3,r5 + asr r6,r11 + .text + .global asrgrimm +asrgrimm: + asr r0,#0 + asr r15,#15 + asr r8,#8 + asr r7,#7 + asr r1,#1 + asr r13,#4 + asr r0,#13 + asr r6,#3 + .text + .global set1grimm +set1grimm: + set1 r0,#0 + set1 r15,#15 + set1 r8,#8 + set1 r7,#7 + set1 r1,#1 + set1 r6,#10 + set1 r13,#1 + set1 r13,#15 + .text + .global set1grgr +set1grgr: + set1 r0,r0 + set1 r15,r15 + set1 r8,r8 + set1 r7,r7 + set1 r1,r1 + set1 r6,r0 + set1 r6,r7 + set1 r14,r2 + .text + .global set1lmemimm +set1lmemimm: + set1 0,#0 + set1 255,#7 + set1 128,#4 + set1 127,#3 + set1 1,#1 + set1 244,#3 + set1 55,#7 + set1 252,#5 + .text + .global set1hmemimm +set1hmemimm: + set1 0x7f00+0,#0 + set1 0x7f00+255,#7 + set1 0x7f00+128,#4 + set1 0x7f00+127,#3 + set1 0x7f00+1,#1 + set1 0x7f00+10,#3 + set1 0x7f00+99,#4 + set1 0x7f00+148,#3 + .text + .global clr1grimm +clr1grimm: + clr1 r0,#0 + clr1 r15,#15 + clr1 r8,#8 + clr1 r7,#7 + clr1 r1,#1 + clr1 r12,#0 + clr1 r8,#11 + clr1 r7,#7 + .text + .global clr1grgr +clr1grgr: + clr1 r0,r0 + clr1 r15,r15 + clr1 r8,r8 + clr1 r7,r7 + clr1 r1,r1 + clr1 r3,r3 + clr1 r0,r1 + clr1 r15,r0 + .text + .global clr1lmemimm +clr1lmemimm: + clr1 0,#0 + clr1 255,#7 + clr1 128,#4 + clr1 127,#3 + clr1 1,#1 + clr1 114,#7 + clr1 229,#4 + clr1 86,#1 + .text + .global clr1hmemimm +clr1hmemimm: + clr1 0x7f00+0,#0 + clr1 0x7f00+255,#7 + clr1 0x7f00+128,#4 + clr1 0x7f00+127,#3 + clr1 0x7f00+1,#1 + clr1 0x7f00+44,#3 + clr1 0x7f00+212,#5 + clr1 0x7f00+67,#7 + .text + .global cbwgr +cbwgr: + cbw r0 + cbw r15 + cbw r8 + cbw r7 + cbw r1 + cbw r8 + cbw r11 + cbw r3 + .text + .global revgr +revgr: + rev r0 + rev r15 + rev r8 + rev r7 + rev r1 + rev r1 + rev r1 + rev r14 + .text + .global bgr +bgr: + br r0 + br r15 + br r8 + br r7 + br r1 + br r0 + br r15 + br r12 + .text + .global jmp +jmp: + jmp r8,r0 + jmp r9,r15 + jmp r9,r8 + jmp r8,r7 + jmp r9,r1 + jmp r9,r7 + jmp r9,r5 + jmp r8,r12 + .text + .global jmpf +jmpf: + jmpf 0 + jmpf 16777215 + jmpf 8388608 + jmpf 8388607 + jmpf 1 + jmpf 10731629 + jmpf 15094866 + jmpf 1464024 + .text + .global callrgr +callrgr: + callr r0 + callr r15 + callr r8 + callr r7 + callr r1 + callr r1 + callr r12 + callr r8 + .text + .global callgr +callgr: + call r8,r0 + call r9,r15 + call r9,r8 + call r8,r7 + call r9,r1 + call r9,r6 + call r9,r14 + call r8,r12 + .text + .global callfimm +callfimm: + callf 0 + callf 16777215 + callf 8388608 + callf 8388607 + callf 1 + callf 13546070 + callf 10837983 + callf 15197875 + .text + .global icallrgr +icallrgr: + icallr r0 + icallr r15 + icallr r8 + icallr r7 + icallr r1 + icallr r15 + icallr r12 + icallr r9 + .text + .global icallgr +icallgr: + icall r8,r0 + icall r9,r15 + icall r9,r8 + icall r8,r7 + icall r9,r1 + icall r9,r10 + icall r8,r15 + icall r8,r10 + .text + .global icallfimm +icallfimm: + icallf 0 + icallf 16777215 + icallf 8388608 + icallf 8388607 + icallf 1 + icallf 9649954 + icallf 1979758 + icallf 7661640 + .text + .global iret +iret: + iret + .text + .global ret +ret: + ret + .text + .global mul +mul: + mul + .text + .global div +div: + div + .text + .global nop +nop: + nop + ret + .text + .global halt +halt: + halt + .text + .global hold +hold: + hold + .text + .global brk +brk: + brk + .text + .global bccgrgr +bccgrgr: + bge r0,r0,0+(.+4) + bz r15,r15,-1+(.+4) + bpl r8,r8,-2048+(.+4) + bls r7,r7,2047+(.+4) + bnc r1,r1,1+(.+4) + bc r3,r13,1799+(.+4) + bge r1,r10,-2019+(.+4) + bz r0,r5,-1132+(.+4) + .text + .global bccgrimm8 +bccgrimm8: + bge r0,#0,0+(.+4) + bz r7,#255,-1+(.+4) + bpl r4,#128,-2048+(.+4) + bls r3,#127,2047+(.+4) + bnc r1,#1,1+(.+4) + bnc r3,#8,1473+(.+4) + bnz.b r5,#203,1619+(.+4) + bc r7,#225,978+(.+4) + .text + .global bccimm16 +bccimm16: + bge Rx,#0,0+(.+4) + bz Rx,#65535,-1+(.+4) + bpl Rx,#32768,-128+(.+4) + bls Rx,#32767,127+(.+4) + bnc Rx,#1,1+(.+4) + bz.b Rx,#30715,4+(.+4) + bnv Rx,#62266,-13+(.+4) + bnv Rx,#48178,108+(.+4) + .text + .global bngrimm4 +bngrimm4: + bn r0,#0,0+(.+4) + bn r15,#15,-1+(.+4) + bn r8,#8,-2048+(.+4) + bn r7,#7,2047+(.+4) + bn r1,#1,1+(.+4) + bn r11,#3,-1975+(.+4) + bn r15,#4,-1205+(.+4) + bn r10,#8,1691+(.+4) + .text + .global bngrgr +bngrgr: + bn r0,r0,0+(.+4) + bn r15,r15,-1+(.+4) + bn r8,r8,-2048+(.+4) + bn r7,r7,2047+(.+4) + bn r1,r1,1+(.+4) + bn r4,r3,1181+(.+4) + bn r5,r2,77+(.+4) + bn r3,r7,631+(.+4) + .text + .global bnlmemimm +bnlmemimm: + bn 0,#0,0+(.+4) + bn 255,#7,-1+(.+4) + bn 128,#4,-2048+(.+4) + bn 127,#3,2047+(.+4) + bn 1,#1,1+(.+4) + bn 153,#7,-847+(.+4) + bn 204,#0,-1881+(.+4) + bn 242,#7,1396+(.+4) + .text + .global bnhmemimm +bnhmemimm: + bn 0x7f00+0,#0,0+(.+4) + bn 0x7f00+255,#7,-1+(.+4) + bn 0x7f00+128,#4,-2048+(.+4) + bn 0x7f00+127,#3,2047+(.+4) + bn 0x7f00+1,#1,1+(.+4) + bn 0x7f00+185,#3,-614+(.+4) + bn 0x7f00+105,#1,-668+(.+4) + bn 0x7f00+79,#7,1312+(.+4) + .text + .global bpgrimm4 +bpgrimm4: + bp r0,#0,0+(.+4) + bp r15,#15,-1+(.+4) + bp r8,#8,-2048+(.+4) + bp r7,#7,2047+(.+4) + bp r1,#1,1+(.+4) + bp r0,#12,1075+(.+4) + bp r1,#5,551+(.+4) + bp r6,#8,1588+(.+4) + .text + .global bpgrgr +bpgrgr: + bp r0,r0,0+(.+4) + bp r15,r15,-1+(.+4) + bp r8,r8,-2048+(.+4) + bp r7,r7,2047+(.+4) + bp r1,r1,1+(.+4) + bp r4,r9,-614+(.+4) + bp r9,r10,-1360+(.+4) + bp r4,r1,407+(.+4) + .text + .global bplmemimm +bplmemimm: + bp 0,#0,0+(.+4) + bp 255,#7,-1+(.+4) + bp 128,#4,-2048+(.+4) + bp 127,#3,2047+(.+4) + bp 1,#1,1+(.+4) + bp 193,#3,-398+(.+4) + bp 250,#2,-1553+(.+4) + bp 180,#6,579+(.+4) + .text + .global bphmemimm +bphmemimm: + bp 0x7f00+0,#0,0+(.+4) + bp 0x7f00+255,#7,-1+(.+4) + bp 0x7f00+128,#4,-2048+(.+4) + bp 0x7f00+127,#3,2047+(.+4) + bp 0x7f00+1,#1,1+(.+4) + bp 0x7f00+195,#1,-432+(.+4) + bp 0x7f00+129,#5,-1508+(.+4) + bp 0x7f00+56,#3,1723+(.+4) + .text + .global bcc +bcc: + bge 0+(.+2) + bz -1+(.+2) + bpl -128+(.+2) + bls 127+(.+2) + bnc 1+(.+2) + bnz.b 48+(.+2) + bnc -7+(.+2) + bnz.b 74+(.+2) + .text + .global br +br: + br 0+(.+2) + br -2+(.+2) + br -2048+(.+2) + br 2046+(.+2) + br 1+(.+2) + br 1472+(.+2) + br 1618+(.+2) + br 978+(.+2) + .text + .global callrimm +callrimm: + callr 0+(.+2) + callr -2+(.+2) + callr -2048+(.+2) + callr 2046+(.+2) + callr 1+(.+2) + callr 1472+(.+2) + callr 1618+(.+2) + callr 978+(.+2) diff --git a/gas/testsuite/gas/xstormy16/allinsn.sh b/gas/testsuite/gas/xstormy16/allinsn.sh new file mode 100644 index 000000000..466e44cb5 --- /dev/null +++ b/gas/testsuite/gas/xstormy16/allinsn.sh @@ -0,0 +1,1389 @@ +#/bin/sh +# Generate test result data for xstormy16 GAS testing. +# This script is machine generated. +# It is intended to be run in the testsuite source directory. +# +# Syntax: build.sh /path/to/build/gas + +if [ $# = 0 ] ; then + if [ ! -x ../gas/as-new ] ; then + echo "Usage: $0 [/path/to/gas/build]" + else + BUILD=`pwd`/../gas + fi +else + BUILD=$1 +fi + +if [ ! -x $BUILD/as-new ] ; then + echo "$BUILD is not a gas build directory" + exit 1 +fi + +# Put results here, so we preserve the existing set for comparison. +rm -rf tmpdir +mkdir tmpdir +cd tmpdir + +function gentest { + rm -f a.out + $BUILD/as-new ${1}.s -o a.out + echo "#as:" >${1}.d + echo "#objdump: -dr" >>${1}.d + echo "#name: $1" >>${1}.d + $BUILD/../binutils/objdump -dr a.out | sed -e 's/(/\\(/g' -e 's/)/\\)/g' -e 's/\$/\\$/g' -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/[+]/\\+/g' -e 's/[.]/\\./g' -e 's/[*]/\\*/g' | sed -e 's/^.*file format.*$/.*: +file format .*/' >>${1}.d + rm -f a.out +} + +# Now come all the testcases. +cat > allinsn.s <: + 0: 30 31 ff ff mov r0,#0xffff + 4: 30 31 ff ff mov r0,#0xffff + 8: 40 31 00 00 add r0,#0x0 + a: R_XSTORMY16_16 some_external_symbol + c: 30 31 00 00 mov r0,#0x0 + e: R_XSTORMY16_16 some_external_symbol diff --git a/gas/testsuite/gas/xstormy16/gcc.s b/gas/testsuite/gas/xstormy16/gcc.s new file mode 100644 index 000000000..a86bf6fbc --- /dev/null +++ b/gas/testsuite/gas/xstormy16/gcc.s @@ -0,0 +1,4 @@ + mov.w r0,#-1 + mov.w r0,#0xFFFF + add r0,#some_external_symbol + mov.w r0,#some_external_symbol diff --git a/gas/testsuite/gas/xstormy16/gcc.sh b/gas/testsuite/gas/xstormy16/gcc.sh new file mode 100644 index 000000000..1eb897277 --- /dev/null +++ b/gas/testsuite/gas/xstormy16/gcc.sh @@ -0,0 +1,45 @@ +#/bin/sh +# Generate test result data for xstormy16 GAS testing. +# It is intended to be run in the testsuite source directory. +# +# Syntax: build.sh /path/to/build/gas + +if [ $# = 0 ] ; then + if [ ! -x ../gas/as-new ] ; then + echo "Usage: $0 [/path/to/gas/build]" + else + BUILD=`pwd`/../gas + fi +else + BUILD=$1 +fi + +if [ ! -x $BUILD/as-new ] ; then + echo "$BUILD is not a gas build directory" + exit 1 +fi + +# Put results here, so we preserve the existing set for comparison. +rm -rf tmpdir +mkdir tmpdir +cd tmpdir + +function gentest { + rm -f a.out + $BUILD/as-new ${1}.s -o a.out + echo "#as:" >${1}.d + echo "#objdump: -dr" >>${1}.d + echo "#name: $1" >>${1}.d + $BUILD/../binutils/objdump -dr a.out | sed -e 's/(/\\(/g' -e 's/)/\\)/g' -e 's/\$/\\$/g' -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/[+]/\\+/g' -e 's/[.]/\\./g' -e 's/[*]/\\*/g' | sed -e 's/^.*file format.*$/.*: +file format .*/' >>${1}.d + rm -f a.out +} + +# Now come all the testcases. +cat > gcc.s <: + 0: 10 30 inc r0,#0x1 + 2: 00 e3 set1 0x0,#0x1 + 4: 00 7c fc 1f bn 0x0,#0x1,0x4 + 8: 40 31 01 00 add r0,#0x1 + c: 08 71 01 00 mov\.w r0,\(r0,1\) + 10: 01 79 00 00 mov\.w 0x1,#0x0 + 14: 01 47 mov Rx,#0x1 + 16: 00 79 01 00 mov\.w 0x0,#0x1 + 1a: 01 02 00 00 jmpf 0x1 + 1e: ff d0 bge 0x1f + 20: fd c0 00 00 bge Rx,#0x0,0x21 + 24: 00 0d fd 0f bge r0,r0,0x25 + 28: fe 1f br 0x28 + 2a: 00 79 00 00 mov\.w 0x0,#0x0 + 2a: R_XSTORMY16_8 global + 2e: 00 47 mov Rx,#0x0 + 2e: R_XSTORMY16_8 global + 30: 00 79 00 00 mov\.w 0x0,#0x0 + 32: R_XSTORMY16_16 global + 34: fe d0 bge 0x34 + 34: R_XSTORMY16_PC8 global + 36: fc c0 00 00 bge Rx,#0x0,0x36 + 36: R_XSTORMY16_PC8 global + 3a: 00 0d fc 0f bge r0,r0,0x3a + 3c: R_XSTORMY16_REL_12 global + 3e: fe 1f br 0x3e + 3e: R_XSTORMY16_REL_12 global + 40: 0a d0 bge 0x4c + 42: 06 c0 00 00 bge Rx,#0x0,0x4c + 46: 00 0d 02 00 bge r0,r0,0x4c + 4a: 00 10 br 0x4c + 4c: fe d0 bge 0x4c + 4e: fa c0 00 00 bge Rx,#0x0,0x4c + 52: 00 0d f6 0f bge r0,r0,0x4c + 56: f4 1f br 0x4c + 58: 00 79 00 00 mov\.w 0x0,#0x0 + 5a: R_XSTORMY16_16 global\+0x4 + 5c: 00 79 00 00 mov\.w 0x0,#0x0 + 5e: R_XSTORMY16_16 \.text\+0x4c + 60: 00 79 00 00 mov\.w 0x0,#0x0 + 62: R_XSTORMY16_16 \.text\+0x50 + 64: 00 79 00 00 mov\.w 0x0,#0x0 + 66: R_XSTORMY16_PC16 global\+0xffffff9c + 68: 00 79 00 00 mov\.w 0x0,#0x0 + 6a: R_XSTORMY16_PC16 global\+0xffffffb4 + 6c: 00 02 00 00 jmpf 0x0 + 6c: R_XSTORMY16_24 global diff --git a/gas/testsuite/gas/xstormy16/reloc-2.s b/gas/testsuite/gas/xstormy16/reloc-2.s new file mode 100644 index 000000000..6fae78a64 --- /dev/null +++ b/gas/testsuite/gas/xstormy16/reloc-2.s @@ -0,0 +1,48 @@ + .text +; check that forward references work for all operands. + inc r0,#fwd1 + set1 0,#fwd1 + bn 0,#fwd1,. + add r0,#fwd1 + mov r0,(r0,fwd1) + mov fwd1,#0 + mov rx,#fwd1 + mov 0,#fwd1 + jmpf fwd1 + bge fwd1+. + bge Rx,#0,fwd1+. + bge r0,r0,fwd1+. + br fwd1+. +fwd1 = 1 + +; check that global references work for those operands that support them + .globl global + + mov global,#0 + mov rx,#global + mov 0,#global +; jmpf global + bge global + bge Rx,#0,global + bge r0,r0,global + br global + +; check branch operations to local labels + bge .L1 + bge Rx,#0,.L1 + bge r0,r0,.L1 + br .L1 +.L1: + bge .L1 + bge Rx,#0,.L1 + bge r0,r0,.L1 + br .L1 + +; check immediate operands thoroughly + mov 0,#global+4 + mov 0,#.L1 + mov 0,#.L1+4 + mov 0,#global-. + mov 0,#global-.L1 + + jmpf global diff --git a/include/ChangeLog b/include/ChangeLog index 01e75c1d4..5a13fee45 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2001-12-07 Geoffrey Keating + + * dis-asm.h (print_insn_xstormy16): Declare. + 2001-12-06 Richard Henderson * demangle.h (no_demangling): New. diff --git a/include/dis-asm.h b/include/dis-asm.h index 1a4f28744..7b52ea810 100644 --- a/include/dis-asm.h +++ b/include/dis-asm.h @@ -226,6 +226,7 @@ extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*)); +extern int print_insn_xstormy16 PARAMS ((bfd_vma, disassemble_info*)); extern disassembler_ftype arc_get_disassembler PARAMS ((void *)); extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *)); diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 03f7aefde..dcf1f6b55 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,9 @@ +2001-12-07 Geoffrey Keating + Richard Henderson + + * common.h (EM_XSTORMY16): Define. + * xstormy16.h: New file. + 2001-11-15 Alan Modra * common.h (NT_ARCH): Define. Remove incorrect comment. diff --git a/include/elf/common.h b/include/elf/common.h index 06d5239e5..e83f269b2 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -233,6 +233,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Written in the absense of an ABI. */ #define EM_OPENRISC_OLD 0x3426 +#define EM_XSTORMY16 0xad45 + /* See the above comment before you add a new EM_* value here. */ /* Values for e_version. */ diff --git a/include/elf/xstormy16.h b/include/elf/xstormy16.h new file mode 100644 index 000000000..ee6c551a0 --- /dev/null +++ b/include/elf/xstormy16.h @@ -0,0 +1,53 @@ +/* XSTORMY16 ELF support for BFD. + Copyright (C) 2001 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. */ + +#ifndef _ELF_XSTORMY16_H +#define _ELF_XSTORMY16_H + +#include "elf/reloc-macros.h" + +/* Relocations. */ +START_RELOC_NUMBERS (elf_xstormy16_reloc_type) + RELOC_NUMBER (R_XSTORMY16_NONE, 0) + + RELOC_NUMBER (R_XSTORMY16_32, 1) + RELOC_NUMBER (R_XSTORMY16_16, 2) + RELOC_NUMBER (R_XSTORMY16_8, 3) + RELOC_NUMBER (R_XSTORMY16_PC32, 4) + RELOC_NUMBER (R_XSTORMY16_PC16, 5) + RELOC_NUMBER (R_XSTORMY16_PC8, 6) + + RELOC_NUMBER (R_XSTORMY16_REL_12, 7) + RELOC_NUMBER (R_XSTORMY16_24, 8) + RELOC_NUMBER (R_XSTORMY16_FPTR16, 9) + + RELOC_NUMBER (R_XSTORMY16_GNU_VTINHERIT, 128) + RELOC_NUMBER (R_XSTORMY16_GNU_VTENTRY, 129) +END_RELOC_NUMBERS (R_XSTORMY16_max) + +/* Define the data & instruction memory discriminator. In a linked + executable, an symbol should be deemed to point to an instruction + if ((address & XSTORMY16_INSN_MASK) == XSTORMY16_INSN_VALUE), and similarly + for the data space. See also `ld/emulparams/elf32xstormy16.sh'. */ +#define XSTORMY16_DATA_MASK 0xffc00000 +#define XSTORMY16_DATA_VALUE 0x00000000 +#define XSTORMY16_INSN_MASK 0xffc00000 +#define XSTORMY16_INSN_VALUE 0x00400000 + +#endif /* _ELF_XSTORMY16_H */ diff --git a/ld/ChangeLog b/ld/ChangeLog index 3a42bc142..77e711384 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2001-12-07 Geoffrey Keating + Richard Henderson + + * Makefile.am: Add support for xstormy16. + * configure.tgt: Add support for xstormy16. + * Makefile.in: Regenerate. + * emulparams/elf32xstormy16.sh: New file. + * scripttempl/xstormy16.sc: New file. + 2001-12-07 Nick Clifton * lexsup.c (ld_options): Insert 'PROGRAM' into the text string diff --git a/ld/Makefile.am b/ld/Makefile.am index f567a419b..54eeac6ef 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -160,6 +160,7 @@ ALL_EMULATIONS = \ eelf32ppc.o \ eelf32ppclinux.o \ eelf32ppcsim.o \ + eelf32xstormy16.o \ eelf_i386.o \ eelf_i386_be.o \ eelf_i386_chaos.o \ @@ -436,6 +437,10 @@ edelta68.c: $(srcdir)/emulparams/delta68.sh \ eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS} ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)" +eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)" eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)" diff --git a/ld/Makefile.in b/ld/Makefile.in index 1231eb75c..be78ca261 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -269,6 +269,7 @@ ALL_EMULATIONS = \ eelf32ppc.o \ eelf32ppclinux.o \ eelf32ppcsim.o \ + eelf32xstormy16.o \ eelf_i386.o \ eelf_i386_be.o \ eelf_i386_chaos.o \ @@ -1157,6 +1158,10 @@ edelta68.c: $(srcdir)/emulparams/delta68.sh \ eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS} ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)" +eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)" eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)" diff --git a/ld/configure.tgt b/ld/configure.tgt index a66f77a15..5bfb5760f 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -388,6 +388,7 @@ v850-*-*) targ_emul=v850 ;; v850e-*-*) targ_emul=v850 ;; v850ea-*-*) targ_emul=v850 ;; w65-*-*) targ_emul=w65 ;; +xstormy16-*-*) targ_emul=elf32xstormy16 ;; fr30-*-*) targ_emul=elf32fr30 ;; mcore-*-pe) targ_emul=mcorepe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; diff --git a/ld/emulparams/elf32xstormy16.sh b/ld/emulparams/elf32xstormy16.sh new file mode 100644 index 000000000..a512ec369 --- /dev/null +++ b/ld/emulparams/elf32xstormy16.sh @@ -0,0 +1,13 @@ +MACHINE= +SCRIPT_NAME=xstormy16 +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=needrelax +OUTPUT_FORMAT="elf32-xstormy16" +# See also `include/elf/xstormy16.h' +ARCH=xstormy16 +ALIGNMENT=2 +ENTRY=_start +EMBEDDED=yes +NOP=0 + + diff --git a/ld/scripttempl/xstormy16.sc b/ld/scripttempl/xstormy16.sc new file mode 100644 index 000000000..d504e1810 --- /dev/null +++ b/ld/scripttempl/xstormy16.sc @@ -0,0 +1,238 @@ +# +# Unusual variables checked by this code: +# NOP - two byte opcode for no-op (defaults to 0) +# INITIAL_READONLY_SECTIONS - at start of text segment +# OTHER_READONLY_SECTIONS - other than .text .init .rodata ... +# (e.g., .PARISC.milli) +# OTHER_TEXT_SECTIONS - these get put in .text when relocating +# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ... +# (e.g., .PARISC.global) +# OTHER_BSS_SECTIONS - other than .bss .sbss ... +# 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_GOT_SYMBOLS - symbols defined just before .got. +# OTHER_GOT_SECTIONS - sections just after .got and .sdata. +# OTHER_BSS_SYMBOLS - symbols that appear at the start of the +# .bss section besides __bss_start. +# INPUT_FILES - INPUT command of files to always include +# INIT_START, INIT_END - statements just before and just after +# combination of .init sections. +# FINI_START, FINI_END - statements just before and just after +# combination of .fini sections. +# +# When adding sections, do note that the names of some sections are used +# when specifying the start address of the next. +# + +# Many sections come in three flavours. There is the 'real' section, +# like ".data". Then there are the per-procedure or per-variable +# sections, generated by -ffunction-sections and -fdata-sections in GCC, +# and useful for --gc-sections, which for a variable "foo" might be +# ".data.foo". Then there are the linkonce sections, for which the linker +# eliminates duplicates, which are named like ".gnu.linkonce.d.foo". +# The exact correspondences are: +# +# Section Linkonce section +# .text .gnu.linkonce.t.foo +# .rodata .gnu.linkonce.r.foo +# .data .gnu.linkonce.d.foo +# .bss .gnu.linkonce.b.foo +# .sdata .gnu.linkonce.s.foo +# .sbss .gnu.linkonce.sb.foo +# .sdata2 .gnu.linkonce.s2.foo +# .sbss2 .gnu.linkonce.sb2.foo +# +# Each of these can also have corresponding .rel.* and .rela.* sections. + +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} +if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi +test -z "${ELFSIZE}" && ELFSIZE=32 +test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" +CTOR=".ctors ${CONSTRUCTING-0} : + { + ${CONSTRUCTING+${CTOR_START}} + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + + KEEP (*crtbegin.o(.ctors)) + + /* We don't want to include the .ctor section from + from the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + + KEEP (*(EXCLUDE_FILE (*crtend.o $OTHER_EXCLUDE_FILES) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + ${CONSTRUCTING+${CTOR_END}} + } > ROM" + +DTOR=" .dtors ${CONSTRUCTING-0} : + { + ${CONSTRUCTING+${DTOR_START}} + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o $OTHER_EXCLUDE_FILES) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + ${CONSTRUCTING+${DTOR_END}} + } > ROM" + +cat < RAM + ${RELOCATING+${OTHER_READWRITE_SECTIONS}} + ${RELOCATING+${OTHER_GOT_SYMBOLS}} + ${RELOCATING+${OTHER_GOT_SECTIONS}} + ${RELOCATING+_edata = .;} + ${RELOCATING+PROVIDE (edata = .);} + ${RELOCATING+__bss_start = .;} + ${RELOCATING+${OTHER_BSS_SYMBOLS}} + .bss ${RELOCATING-0} : + { + *(.dynbss) + *(.bss) + ${RELOCATING+*(.bss.*)} + ${RELOCATING+*(.gnu.linkonce.b.*)} + *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. */ + ${RELOCATING+. = ALIGN(${ALIGNMENT});} + } > RAM + ${RELOCATING+${OTHER_BSS_SECTIONS}} + ${RELOCATING+. = ALIGN(${ALIGNMENT});} + ${RELOCATING+__stack = .;} + ${RELOCATING+. = . + 4096;} + ${RELOCATING+_end = .;} + ${RELOCATING+${OTHER_BSS_END_SYMBOLS}} + ${RELOCATING+PROVIDE (end = .);} + + /* Read-only sections in ROM. */ + .int_vec ${RELOCATING-0} : { *(.int_vec) } > ROM + + .rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} } > ROM + ${RELOCATING+${CTOR}} + ${RELOCATING+${DTOR}} + .eh_frame : { KEEP (*(.eh_frame)) } > ROM + .gcc_except_table : { *(.gcc_except_table) } > ROM + .plt : { *(.plt) } > ROM + + .text ${RELOCATING-0} : + { + ${RELOCATING+${TEXT_START_SYMBOLS}} + *(.text) + ${RELOCATING+*(.text.*)} + *(.stub) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + ${RELOCATING+*(.gnu.linkonce.t.*)} + ${RELOCATING+${OTHER_TEXT_SECTIONS}} + } > ROM =${NOP-0} + .init ${RELOCATING-0} : + { + ${RELOCATING+${INIT_START}} + KEEP (*(.init)) + ${RELOCATING+${INIT_END}} + } > ROM =${NOP-0} + .fini ${RELOCATING-0} : + { + ${RELOCATING+${FINI_START}} + KEEP (*(.fini)) + ${RELOCATING+${FINI_END}} + } > ROM =${NOP-0} + ${RELOCATING+PROVIDE (__etext = .);} + ${RELOCATING+PROVIDE (_etext = .);} + ${RELOCATING+PROVIDE (etext = .);} + ${RELOCATING+${OTHER_READONLY_SECTIONS}} + + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + + .comment 0 : { *(.comment) } + + /* 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) *(.gnu.linkonce.wi.*) } + .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) } + + ${RELOCATING+${OTHER_RELOCATING_SECTIONS}} + + /* These must appear regardless of ${RELOCATING}. */ + ${OTHER_SECTIONS} +} +EOF diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index da7497fa9..383e52af3 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,18 @@ +2001-12-07 Geoffrey Keating + + * Makefile.am: Add support for xstormy16. + * Makefile.in: Regenerate. + * configure.in: Add support for xstormy16. + * configure: Regenerate. + * disassemble.c: Add support for xstormy16. + * xstormy16-asm.c: New generated file. + * xstormy16-desc.c: New generated file. + * xstormy16-desc.h: New generated file. + * xstormy16-dis.c: New generated file. + * xstormy16-ibld.c: New generated file. + * xstormy16-opc.c: New generated file. + * xstormy16-opc.h: New generated file. + 2001-12-06 Richard Henderson * alpha-opc.c (alpha_opcodes): Add wh64en. diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am index e42c41ddd..ee7b19f89 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am @@ -32,6 +32,7 @@ HFILES = \ ia64-asmtab.h \ ia64-opc.h \ w65-opc.h \ + xstormy16-desc.h xstormy16-opc.h \ z8k-opc.h # C source files that correspond to .o's. @@ -126,6 +127,11 @@ CFILES = \ v850-opc.c \ vax-dis.c \ w65-dis.c \ + xstormy16-asm.c \ + xstormy16-desc.c \ + xstormy16-dis.c \ + xstormy16-ibld.c \ + xstormy16-opc.c \ z8k-dis.c \ z8kgen.c @@ -209,6 +215,11 @@ ALL_MACHINES = \ v850-opc.lo \ vax-dis.lo \ w65-dis.lo \ + xstormy16-asm.lo \ + xstormy16-desc.lo \ + xstormy16-dis.lo \ + xstormy16-ibld.lo \ + xstormy16-opc.lo \ z8k-dis.lo OFILES = @BFD_MACHINES@ @@ -253,6 +264,7 @@ config.status: $(srcdir)/configure $(srcdir)/../bfd/configure.in CLEANFILES = \ stamp-m32r stamp-fr30 stamp-openrisc \ + stamp-xstormy16 \ libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2 @@ -272,10 +284,12 @@ if CGEN_MAINT M32R_DEPS = stamp-m32r FR30_DEPS = stamp-fr30 OPENRISC_DEPS = stamp-openrisc +XSTORMY16_DEPS = stamp-xstormy16 else M32R_DEPS = FR30_DEPS = OPENRISC_DEPS = +XSTORMY16_DEPS = endif run-cgen: @@ -301,6 +315,11 @@ $(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(s stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc $(MAKE) run-cgen arch=openrisc prefix=openrisc options= extrafiles= +$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS) + @true +stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc + $(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= extrafiles= + ia64-gen: ia64-gen.o $(LINK) ia64-gen.o $(LIBIBERTY) diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in index c79ebe2e5..aeeb9e55d 100644 --- a/opcodes/Makefile.in +++ b/opcodes/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am +# Makefile.in generated automatically by automake 1.4 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -142,6 +142,7 @@ HFILES = \ ia64-asmtab.h \ ia64-opc.h \ w65-opc.h \ + xstormy16-desc.h xstormy16-opc.h \ z8k-opc.h @@ -237,6 +238,11 @@ CFILES = \ v850-opc.c \ vax-dis.c \ w65-dis.c \ + xstormy16-asm.c \ + xstormy16-desc.c \ + xstormy16-dis.c \ + xstormy16-ibld.c \ + xstormy16-opc.c \ z8k-dis.c \ z8kgen.c @@ -321,6 +327,11 @@ ALL_MACHINES = \ v850-opc.lo \ vax-dis.lo \ w65-dis.lo \ + xstormy16-asm.lo \ + xstormy16-desc.lo \ + xstormy16-dis.lo \ + xstormy16-ibld.lo \ + xstormy16-opc.lo \ z8k-dis.lo @@ -344,6 +355,7 @@ POTFILES = $(HFILES) $(CFILES) CLEANFILES = \ stamp-m32r stamp-fr30 stamp-openrisc \ + stamp-xstormy16 \ libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2 @@ -365,6 +377,8 @@ CGENDEPS = ../cgen/stamp-cgen \ @CGEN_MAINT_FALSE@FR30_DEPS = @CGEN_MAINT_TRUE@OPENRISC_DEPS = @CGEN_MAINT_TRUE@stamp-openrisc @CGEN_MAINT_FALSE@OPENRISC_DEPS = +@CGEN_MAINT_TRUE@XSTORMY16_DEPS = @CGEN_MAINT_TRUE@stamp-xstormy16 +@CGEN_MAINT_FALSE@XSTORMY16_DEPS = ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = config.h @@ -558,7 +572,7 @@ maintainer-clean-recursive: dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ - test "$$subdir" != "." || dot_seen=yes; \ + test "$$subdir" = "." && dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ @@ -812,6 +826,11 @@ $(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(s stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc $(MAKE) run-cgen arch=openrisc prefix=openrisc options= extrafiles= +$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS) + @true +stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc + $(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= extrafiles= + ia64-gen: ia64-gen.o $(LINK) ia64-gen.o $(LIBIBERTY) diff --git a/opcodes/configure b/opcodes/configure index e06aabaf9..cc7fc7c90 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -55,6 +55,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -169,6 +170,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -339,6 +341,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -504,12 +511,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -548,12 +559,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:552: checking for Cygwin environment" >&5 +echo "configure:563: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -581,19 +592,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:585: checking for mingw32 environment" >&5 +echo "configure:596: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -658,7 +669,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:662: checking host system type" >&5 +echo "configure:673: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -679,7 +690,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:683: checking target system type" >&5 +echo "configure:694: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -697,7 +708,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:701: checking build system type" >&5 +echo "configure:712: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -721,7 +732,7 @@ test "$host_alias" != "$target_alias" && echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:725: checking for strerror in -lcposix" >&5 +echo "configure:736: checking for strerror in -lcposix" >&5 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -729,7 +740,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:755: \"$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 @@ -780,7 +791,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${ # 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:784: checking for a BSD compatible install" >&5 +echo "configure:795: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -833,7 +844,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:837: checking whether build environment is sane" >&5 +echo "configure:848: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -890,7 +901,7 @@ test "$program_suffix" != NONE && 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:894: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:905: 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 echo $ac_n "(cached) $ac_c" 1>&6 @@ -936,7 +947,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:940: checking for working aclocal" >&5 +echo "configure:951: 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. @@ -949,7 +960,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:953: checking for working autoconf" >&5 +echo "configure:964: 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. @@ -962,7 +973,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:966: checking for working automake" >&5 +echo "configure:977: 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. @@ -975,7 +986,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:979: checking for working autoheader" >&5 +echo "configure:990: 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. @@ -988,7 +999,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:992: checking for working makeinfo" >&5 +echo "configure:1003: 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. @@ -1011,7 +1022,7 @@ 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:1015: checking for $ac_word" >&5 +echo "configure:1026: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1043,7 +1054,7 @@ 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:1047: checking for $ac_word" >&5 +echo "configure:1058: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1075,7 +1086,7 @@ 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:1079: checking for $ac_word" >&5 +echo "configure:1090: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1181,7 +1192,7 @@ fi # 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:1185: checking for $ac_word" >&5 +echo "configure:1196: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1211,7 +1222,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:1215: checking for $ac_word" >&5 +echo "configure:1226: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1262,7 +1273,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:1266: checking for $ac_word" >&5 +echo "configure:1277: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1294,7 +1305,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1298: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1309: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1305,12 +1316,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1309 "configure" +#line 1320 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1325: \"$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 @@ -1336,12 +1347,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1340: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1351: checking whether the C compiler ($CC $CFLAGS $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:1345: checking whether we are using GNU C" >&5 +echo "configure:1356: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1350,7 +1361,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1354: \"$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:1365: \"$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 @@ -1369,7 +1380,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:1373: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1384: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1412,7 +1423,7 @@ ac_prog=ld if test "$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:1416: checking for ld used by GCC" >&5 +echo "configure:1427: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1442,10 +1453,10 @@ echo "configure:1416: 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:1446: checking for GNU ld" >&5 +echo "configure:1457: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1449: checking for non-GNU ld" >&5 +echo "configure:1460: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1480,7 +1491,7 @@ else 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:1484: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1495: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1497,7 +1508,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1501: checking for $LD option to reload object files" >&5 +echo "configure:1512: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1509,7 +1520,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1513: checking for BSD-compatible nm" >&5 +echo "configure:1524: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1547,7 +1558,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1551: checking whether ln -s works" >&5 +echo "configure:1562: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1568,7 +1579,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1572: checking how to recognise dependant libraries" >&5 +echo "configure:1583: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1732,13 +1743,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1736: checking for object suffix" >&5 +echo "configure:1747: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1758,7 +1769,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1762: checking for executable suffix" >&5 +echo "configure:1773: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1768,10 +1779,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1795,7 +1806,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1799: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1810: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1857,7 +1868,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1861: checking for file" >&5 +echo "configure:1872: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1928,7 +1939,7 @@ esac # 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:1932: checking for $ac_word" >&5 +echo "configure:1943: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1960,7 +1971,7 @@ 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:1964: checking for $ac_word" >&5 +echo "configure:1975: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1995,7 +2006,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1999: checking for $ac_word" >&5 +echo "configure:2010: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2027,7 +2038,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2031: checking for $ac_word" >&5 +echo "configure:2042: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2094,8 +2105,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2098 "configure"' > conftest.$ac_ext - if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2109 "configure"' > conftest.$ac_ext + if { (eval echo configure:2110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2116,7 +2127,7 @@ 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:2120: checking whether the C compiler needs -belf" >&5 +echo "configure:2131: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2129,14 +2140,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2151: \"$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 @@ -2304,7 +2315,7 @@ if test -z "$target" ; then fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2308: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2319: 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" @@ -2329,7 +2340,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2333: checking for executable suffix" >&5 +echo "configure:2344: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2339,10 +2350,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2365,7 +2376,7 @@ 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:2369: checking for $ac_word" >&5 +echo "configure:2380: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2395,7 +2406,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:2399: checking for $ac_word" >&5 +echo "configure:2410: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2446,7 +2457,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:2450: checking for $ac_word" >&5 +echo "configure:2461: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2478,7 +2489,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2482: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2493: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2489,12 +2500,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2493 "configure" +#line 2504 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2509: \"$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 @@ -2520,12 +2531,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 $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2524: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2535: checking whether the C compiler ($CC $CFLAGS $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:2529: checking whether we are using GNU C" >&5 +echo "configure:2540: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2534,7 +2545,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2538: \"$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:2549: \"$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 @@ -2553,7 +2564,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:2557: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2568: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2587,7 +2598,7 @@ fi ALL_LINGUAS="fr sv tr" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2591: checking how to run the C preprocessor" >&5 +echo "configure:2602: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2602,13 +2613,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2623: \"$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 : @@ -2619,13 +2630,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2640: \"$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 : @@ -2636,13 +2647,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2657: \"$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 : @@ -2669,7 +2680,7 @@ echo "$ac_t""$CPP" 1>&6 # 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:2673: checking for $ac_word" >&5 +echo "configure:2684: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2697,12 +2708,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2701: checking for ANSI C header files" >&5 +echo "configure:2712: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2710,7 +2721,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2725: \"$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* @@ -2727,7 +2738,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 @@ -2745,7 +2756,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 @@ -2766,7 +2777,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2777,7 +2788,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2801,12 +2812,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2805: checking for working const" >&5 +echo "configure:2816: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2876,21 +2887,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2880: checking for inline" >&5 +echo "configure:2891: checking for inline" >&5 if eval "test \"`echo '$''{'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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2916,12 +2927,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2920: checking for off_t" >&5 +echo "configure:2931: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2949,12 +2960,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2953: checking for size_t" >&5 +echo "configure:2964: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2984,19 +2995,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:2988: checking for working alloca.h" >&5 +echo "configure:2999: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3011: \"$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 @@ -3017,12 +3028,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3021: checking for alloca" >&5 +echo "configure:3032: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3065: \"$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 @@ -3082,12 +3093,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3086: checking whether alloca needs Cray hooks" >&5 +echo "configure:3097: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&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:3116: checking for $ac_func" >&5 +echo "configure:3127: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3155: \"$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 @@ -3167,7 +3178,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3171: checking stack direction for C alloca" >&5 +echo "configure:3182: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3175,7 +3186,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3209: \"$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 @@ -3215,21 +3226,21 @@ EOF fi -for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h +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:3223: checking for $ac_hdr" >&5 +echo "configure:3234: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3244: \"$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* @@ -3258,12 +3269,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3262: checking for $ac_func" >&5 +echo "configure:3273: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3301: \"$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 @@ -3311,7 +3322,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3315: checking for working mmap" >&5 +echo "configure:3326: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3319,7 +3330,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include -#if HAVE_SYS_TYPES_H -# include -#endif - -#if HAVE_STDLIB_H -# include -#endif - -#if HAVE_SYS_STAT_H -# include -#endif - -#if HAVE_UNISTD_H -# include -#endif - /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -3472,7 +3470,7 @@ main() } EOF -if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3474: \"$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 @@ -3500,17 +3498,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:3504: checking for $ac_hdr" >&5 +echo "configure:3502: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < 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:3512: \"$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* @@ -3540,12 +3538,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3544: checking for $ac_func" >&5 +echo "configure:3542: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3570: \"$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 @@ -3597,12 +3595,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3601: checking for $ac_func" >&5 +echo "configure:3599: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3627: \"$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 @@ -3659,19 +3657,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3663: checking for LC_MESSAGES" >&5 +echo "configure:3661: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3673: \"$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 @@ -3692,7 +3690,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3696: checking whether NLS is requested" >&5 +echo "configure:3694: 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" @@ -3712,7 +3710,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3716: checking whether included gettext is requested" >&5 +echo "configure:3714: 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" @@ -3731,17 +3729,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3735: checking for libintl.h" >&5 +echo "configure:3733: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3743: \"$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* @@ -3758,19 +3756,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:3762: checking for gettext in libc" >&5 +echo "configure:3760: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3772: \"$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 @@ -3786,7 +3784,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:3790: checking for bindtextdomain in -lintl" >&5 +echo "configure:3788: 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 $ac_n "(cached) $ac_c" 1>&6 @@ -3794,7 +3792,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&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_lib_$ac_lib_var=yes" else @@ -3821,19 +3819,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:3825: checking for gettext in libintl" >&5 +echo "configure:3823: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3835: \"$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 @@ -3861,7 +3859,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:3865: checking for $ac_word" >&5 +echo "configure:3863: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3895,12 +3893,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3899: checking for $ac_func" >&5 +echo "configure:3897: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3925: \"$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 @@ -3950,7 +3948,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:3954: checking for $ac_word" >&5 +echo "configure:3952: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3986,7 +3984,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:3990: checking for $ac_word" >&5 +echo "configure:3988: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4018,7 +4016,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4058,7 +4056,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:4062: checking for $ac_word" >&5 +echo "configure:4060: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4092,7 +4090,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:4096: checking for $ac_word" >&5 +echo "configure:4094: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4128,7 +4126,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:4132: checking for $ac_word" >&5 +echo "configure:4130: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4218,7 +4216,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4222: checking for catalogs to be installed" >&5 +echo "configure:4220: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4246,17 +4244,17 @@ echo "configure:4222: 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:4250: checking for linux/version.h" >&5 +echo "configure:4248: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4258: \"$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* @@ -4334,7 +4332,7 @@ 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:4338: checking for build system executable suffix" >&5 +echo "configure:4336: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4371,7 +4369,7 @@ 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:4375: checking for a BSD compatible install" >&5 +echo "configure:4373: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4428,17 +4426,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:4432: checking for $ac_hdr" >&5 +echo "configure:4430: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4440: \"$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* @@ -4606,6 +4604,7 @@ if test x${all_targets} = xfalse ; then bfd_vax_arch) ta="$ta vax-dis.lo" ;; bfd_w65_arch) ta="$ta w65-dis.lo" ;; bfd_we32k_arch) ;; + bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;; bfd_z8k_arch) ta="$ta z8k-dis.lo" ;; "") ;; diff --git a/opcodes/configure.in b/opcodes/configure.in index 77e048caf..bef461df6 100644 --- a/opcodes/configure.in +++ b/opcodes/configure.in @@ -220,6 +220,7 @@ if test x${all_targets} = xfalse ; then bfd_vax_arch) ta="$ta vax-dis.lo" ;; bfd_w65_arch) ta="$ta w65-dis.lo" ;; bfd_we32k_arch) ;; + bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;; bfd_z8k_arch) ta="$ta z8k-dis.lo" ;; "") ;; diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c index 3a978d455..ab2363501 100644 --- a/opcodes/disassemble.c +++ b/opcodes/disassemble.c @@ -62,6 +62,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ARCH_v850 #define ARCH_vax #define ARCH_w65 +#define ARCH_xstormy16 #define ARCH_z8k #endif @@ -303,6 +304,11 @@ disassembler (abfd) disassemble = print_insn_w65; break; #endif +#ifdef ARCH_xstormy16 + case bfd_arch_xstormy16: + disassemble = print_insn_xstormy16; + break; +#endif #ifdef ARCH_z8k case bfd_arch_z8k: if (bfd_get_mach(abfd) == bfd_mach_z8001) diff --git a/opcodes/xstormy16-asm.c b/opcodes/xstormy16-asm.c new file mode 100644 index 000000000..5cb3921bd --- /dev/null +++ b/opcodes/xstormy16-asm.c @@ -0,0 +1,659 @@ +/* Assembler interface for targets using CGEN. -*- C -*- + CGEN: Cpu tools GENerator + +THIS FILE IS MACHINE GENERATED WITH CGEN. +- the resultant file is machine generated, cgen-asm.in isn't + +Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + +This file is part of the GNU Binutils and GDB, the GNU debugger. + +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, 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. */ + +/* ??? Eventually more and more of this stuff can go to cpu-independent files. + Keep that in mind. */ + +#include "sysdep.h" +#include +#include "ansidecl.h" +#include "bfd.h" +#include "symcat.h" +#include "xstormy16-desc.h" +#include "xstormy16-opc.h" +#include "opintl.h" +#include "xregex.h" +#include "libiberty.h" +#include "safe-ctype.h" + +#undef min +#define min(a,b) ((a) < (b) ? (a) : (b)) +#undef max +#define max(a,b) ((a) > (b) ? (a) : (b)) + +static const char * parse_insn_normal + PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *)); + +/* -- assembler routines inserted here. */ + +/* -- asm.c */ +static const char * parse_mem8 + PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *)); +static const char * parse_small_immediate + PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *)); + +/* The machine-independent code doesn't know how to disambiguate + mov (foo),r3 + and + mov (r2),r3 + where 'foo' is a label. This helps it out. */ + +static const char * +parse_mem8 (cd, strp, opindex, valuep) + CGEN_CPU_DESC cd; + const char **strp; + int opindex; + unsigned long *valuep; +{ + if (**strp == '(') + { + const char *s = *strp; + + if (s[1] == '-' && s[2] == '-') + return _("Bad register in preincrement"); + + while (isalnum (*++s)) + ; + if (s[0] == '+' && s[1] == '+' && (s[2] == ')' || s[2] == ',')) + return _("Bad register in postincrement"); + if (s[0] == ',' || s[0] == ')') + return _("Bad register name"); + } + else if (cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_names, + valuep) == NULL) + return _("Label conflicts with register name"); + else if (strncasecmp (*strp, "rx,", 3) == 0 + || strncasecmp (*strp, "rxl,", 3) == 0 + || strncasecmp (*strp, "rxh,", 3) == 0) + return _("Label conflicts with `Rx'"); + else if (**strp == '#') + return _("Bad immediate expression"); + + return cgen_parse_unsigned_integer (cd, strp, opindex, valuep); +} + +/* For the add and subtract instructions, there are two immediate forms, + one for small operands and one for large ones. We want to use + the small one when possible, but we do not want to generate relocs + of the small size. This is somewhat tricky. */ + +static const char * +parse_small_immediate (cd, strp, opindex, valuep) + CGEN_CPU_DESC cd; + const char **strp; + int opindex; + unsigned long *valuep; +{ + bfd_vma value; + enum cgen_parse_operand_result result; + const char *errmsg; + + errmsg = (* cd->parse_operand_fn) + (cd, CGEN_PARSE_OPERAND_INTEGER, strp, opindex, BFD_RELOC_NONE, + &result, &value); + + if (errmsg) + return errmsg; + + if (result != CGEN_PARSE_OPERAND_RESULT_NUMBER) + return _("Small operand was not an immediate number"); + + *valuep = value; + return NULL; +} +/* -- */ + +const char * xstormy16_cgen_parse_operand + PARAMS ((CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *)); + +/* Main entry point for operand parsing. + + This function is basically just a big switch statement. Earlier versions + used tables to look up the function to use, but + - if the table contains both assembler and disassembler functions then + the disassembler contains much of the assembler and vice-versa, + - there's a lot of inlining possibilities as things grow, + - using a switch statement avoids the function call overhead. + + This function could be moved into `parse_insn_normal', but keeping it + separate makes clear the interface between `parse_insn_normal' and each of + the handlers. */ + +const char * +xstormy16_cgen_parse_operand (cd, opindex, strp, fields) + CGEN_CPU_DESC cd; + int opindex; + const char ** strp; + CGEN_FIELDS * fields; +{ + const char * errmsg = NULL; + /* Used by scalar operands that still need to be parsed. */ + long junk ATTRIBUTE_UNUSED; + + switch (opindex) + { + case XSTORMY16_OPERAND_RB : + errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_names, & fields->f_Rb); + break; + case XSTORMY16_OPERAND_RBJ : + errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_Rbj_names, & fields->f_Rbj); + break; + case XSTORMY16_OPERAND_RD : + errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_names, & fields->f_Rd); + break; + case XSTORMY16_OPERAND_RDM : + errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_names, & fields->f_Rdm); + break; + case XSTORMY16_OPERAND_RM : + errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_names, & fields->f_Rm); + break; + case XSTORMY16_OPERAND_RS : + errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_gr_names, & fields->f_Rs); + break; + case XSTORMY16_OPERAND_ABS24 : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_ABS24, &fields->f_abs24); + break; + case XSTORMY16_OPERAND_BCOND2 : + errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_h_branchcond, & fields->f_op2); + break; + case XSTORMY16_OPERAND_BCOND5 : + errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_h_branchcond, & fields->f_op5); + break; + case XSTORMY16_OPERAND_HMEM8 : + errmsg = parse_mem8 (cd, strp, XSTORMY16_OPERAND_HMEM8, &fields->f_hmem8); + break; + case XSTORMY16_OPERAND_IMM12 : + errmsg = cgen_parse_signed_integer (cd, strp, XSTORMY16_OPERAND_IMM12, &fields->f_imm12); + break; + case XSTORMY16_OPERAND_IMM16 : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_IMM16, &fields->f_imm16); + break; + case XSTORMY16_OPERAND_IMM2 : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_IMM2, &fields->f_imm2); + break; + case XSTORMY16_OPERAND_IMM3 : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_IMM3, &fields->f_imm3); + break; + case XSTORMY16_OPERAND_IMM3B : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_IMM3B, &fields->f_imm3b); + break; + case XSTORMY16_OPERAND_IMM4 : + errmsg = parse_small_immediate (cd, strp, XSTORMY16_OPERAND_IMM4, &fields->f_imm4); + break; + case XSTORMY16_OPERAND_IMM8 : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_IMM8, &fields->f_imm8); + break; + case XSTORMY16_OPERAND_IMM8SMALL : + errmsg = parse_small_immediate (cd, strp, XSTORMY16_OPERAND_IMM8SMALL, &fields->f_imm8); + break; + case XSTORMY16_OPERAND_LMEM8 : + errmsg = parse_mem8 (cd, strp, XSTORMY16_OPERAND_LMEM8, &fields->f_lmem8); + break; + case XSTORMY16_OPERAND_REL12 : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_REL12, &fields->f_rel12); + break; + case XSTORMY16_OPERAND_REL12A : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_REL12A, &fields->f_rel12a); + break; + case XSTORMY16_OPERAND_REL8_2 : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_REL8_2, &fields->f_rel8_2); + break; + case XSTORMY16_OPERAND_REL8_4 : + errmsg = cgen_parse_unsigned_integer (cd, strp, XSTORMY16_OPERAND_REL8_4, &fields->f_rel8_4); + break; + case XSTORMY16_OPERAND_WS2 : + errmsg = cgen_parse_keyword (cd, strp, & xstormy16_cgen_opval_h_wordsize, & fields->f_op2m); + break; + + default : + /* xgettext:c-format */ + fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex); + abort (); + } + + return errmsg; +} + +cgen_parse_fn * const xstormy16_cgen_parse_handlers[] = +{ + parse_insn_normal, +}; + +void +xstormy16_cgen_init_asm (cd) + CGEN_CPU_DESC cd; +{ + xstormy16_cgen_init_opcode_table (cd); + xstormy16_cgen_init_ibld_table (cd); + cd->parse_handlers = & xstormy16_cgen_parse_handlers[0]; + cd->parse_operand = xstormy16_cgen_parse_operand; +} + + + +/* Regex construction routine. + + This translates an opcode syntax string into a regex string, + by replacing any non-character syntax element (such as an + opcode) with the pattern '.*' + + It then compiles the regex and stores it in the opcode, for + later use by xstormy16_cgen_assemble_insn + + Returns NULL for success, an error message for failure. */ + +char * +xstormy16_cgen_build_insn_regex (insn) + CGEN_INSN *insn; +{ + CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn); + const char *mnem = CGEN_INSN_MNEMONIC (insn); + char rxbuf[CGEN_MAX_RX_ELEMENTS]; + char *rx = rxbuf; + const CGEN_SYNTAX_CHAR_TYPE *syn; + int reg_err; + + syn = CGEN_SYNTAX_STRING (CGEN_OPCODE_SYNTAX (opc)); + + /* Mnemonics come first in the syntax string. */ + if (! CGEN_SYNTAX_MNEMONIC_P (* syn)) + return _("missing mnemonic in syntax string"); + ++syn; + + /* Generate a case sensitive regular expression that emulates case + insensitive matching in the "C" locale. We cannot generate a case + insensitive regular expression because in Turkish locales, 'i' and 'I' + are not equal modulo case conversion. */ + + /* Copy the literal mnemonic out of the insn. */ + for (; *mnem; mnem++) + { + char c = *mnem; + + if (ISALPHA (c)) + { + *rx++ = '['; + *rx++ = TOLOWER (c); + *rx++ = TOUPPER (c); + *rx++ = ']'; + } + else + *rx++ = c; + } + + /* Copy any remaining literals from the syntax string into the rx. */ + for(; * syn != 0 && rx <= rxbuf + (CGEN_MAX_RX_ELEMENTS - 7 - 4); ++syn) + { + if (CGEN_SYNTAX_CHAR_P (* syn)) + { + char c = CGEN_SYNTAX_CHAR (* syn); + + switch (c) + { + /* Escape any regex metacharacters in the syntax. */ + case '.': case '[': case '\\': + case '*': case '^': case '$': + +#ifdef CGEN_ESCAPE_EXTENDED_REGEX + case '?': case '{': case '}': + case '(': case ')': case '*': + case '|': case '+': case ']': +#endif + *rx++ = '\\'; + *rx++ = c; + break; + + default: + if (ISALPHA (c)) + { + *rx++ = '['; + *rx++ = TOLOWER (c); + *rx++ = TOUPPER (c); + *rx++ = ']'; + } + else + *rx++ = c; + break; + } + } + else + { + /* Replace non-syntax fields with globs. */ + *rx++ = '.'; + *rx++ = '*'; + } + } + + /* Trailing whitespace ok. */ + * rx++ = '['; + * rx++ = ' '; + * rx++ = '\t'; + * rx++ = ']'; + * rx++ = '*'; + + /* But anchor it after that. */ + * rx++ = '$'; + * rx = '\0'; + + CGEN_INSN_RX (insn) = xmalloc (sizeof (regex_t)); + reg_err = regcomp ((regex_t *) CGEN_INSN_RX (insn), rxbuf, REG_NOSUB); + + if (reg_err == 0) + return NULL; + else + { + static char msg[80]; + + regerror (reg_err, (regex_t *) CGEN_INSN_RX (insn), msg, 80); + regfree ((regex_t *) CGEN_INSN_RX (insn)); + free (CGEN_INSN_RX (insn)); + (CGEN_INSN_RX (insn)) = NULL; + return msg; + } +} + + +/* Default insn parser. + + The syntax string is scanned and operands are parsed and stored in FIELDS. + Relocs are queued as we go via other callbacks. + + ??? Note that this is currently an all-or-nothing parser. If we fail to + parse the instruction, we return 0 and the caller will start over from + the beginning. Backtracking will be necessary in parsing subexpressions, + but that can be handled there. Not handling backtracking here may get + expensive in the case of the m68k. Deal with later. + + Returns NULL for success, an error message for failure. */ + +static const char * +parse_insn_normal (cd, insn, strp, fields) + CGEN_CPU_DESC cd; + const CGEN_INSN *insn; + const char **strp; + CGEN_FIELDS *fields; +{ + /* ??? Runtime added insns not handled yet. */ + const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); + const char *str = *strp; + const char *errmsg; + const char *p; + const CGEN_SYNTAX_CHAR_TYPE * syn; +#ifdef CGEN_MNEMONIC_OPERANDS + /* FIXME: wip */ + int past_opcode_p; +#endif + + /* For now we assume the mnemonic is first (there are no leading operands). + We can parse it without needing to set up operand parsing. + GAS's input scrubber will ensure mnemonics are lowercase, but we may + not be called from GAS. */ + p = CGEN_INSN_MNEMONIC (insn); + while (*p && TOLOWER (*p) == TOLOWER (*str)) + ++p, ++str; + + if (* p) + return _("unrecognized instruction"); + +#ifndef CGEN_MNEMONIC_OPERANDS + if (* str && ! ISSPACE (* str)) + return _("unrecognized instruction"); +#endif + + CGEN_INIT_PARSE (cd); + cgen_init_parse_operand (cd); +#ifdef CGEN_MNEMONIC_OPERANDS + past_opcode_p = 0; +#endif + + /* We don't check for (*str != '\0') here because we want to parse + any trailing fake arguments in the syntax string. */ + syn = CGEN_SYNTAX_STRING (syntax); + + /* Mnemonics come first for now, ensure valid string. */ + if (! CGEN_SYNTAX_MNEMONIC_P (* syn)) + abort (); + + ++syn; + + while (* syn != 0) + { + /* Non operand chars must match exactly. */ + if (CGEN_SYNTAX_CHAR_P (* syn)) + { + /* FIXME: While we allow for non-GAS callers above, we assume the + first char after the mnemonic part is a space. */ + /* FIXME: We also take inappropriate advantage of the fact that + GAS's input scrubber will remove extraneous blanks. */ + if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn))) + { +#ifdef CGEN_MNEMONIC_OPERANDS + if (CGEN_SYNTAX_CHAR(* syn) == ' ') + past_opcode_p = 1; +#endif + ++ syn; + ++ str; + } + else if (*str) + { + /* Syntax char didn't match. Can't be this insn. */ + static char msg [80]; + + /* xgettext:c-format */ + sprintf (msg, _("syntax error (expected char `%c', found `%c')"), + CGEN_SYNTAX_CHAR(*syn), *str); + return msg; + } + else + { + /* Ran out of input. */ + static char msg [80]; + + /* xgettext:c-format */ + sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"), + CGEN_SYNTAX_CHAR(*syn)); + return msg; + } + continue; + } + + /* We have an operand of some sort. */ + errmsg = xstormy16_cgen_parse_operand (cd, CGEN_SYNTAX_FIELD (*syn), + &str, fields); + if (errmsg) + return errmsg; + + /* Done with this operand, continue with next one. */ + ++ syn; + } + + /* If we're at the end of the syntax string, we're done. */ + if (* syn == 0) + { + /* FIXME: For the moment we assume a valid `str' can only contain + blanks now. IE: We needn't try again with a longer version of + the insn and it is assumed that longer versions of insns appear + before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */ + while (ISSPACE (* str)) + ++ str; + + if (* str != '\0') + return _("junk at end of line"); /* FIXME: would like to include `str' */ + + return NULL; + } + + /* We couldn't parse it. */ + return _("unrecognized instruction"); +} + +/* Main entry point. + This routine is called for each instruction to be assembled. + STR points to the insn to be assembled. + We assume all necessary tables have been initialized. + The assembled instruction, less any fixups, is stored in BUF. + Remember that if CGEN_INT_INSN_P then BUF is an int and thus the value + still needs to be converted to target byte order, otherwise BUF is an array + of bytes in target byte order. + The result is a pointer to the insn's entry in the opcode table, + or NULL if an error occured (an error message will have already been + printed). + + Note that when processing (non-alias) macro-insns, + this function recurses. + + ??? It's possible to make this cpu-independent. + One would have to deal with a few minor things. + At this point in time doing so would be more of a curiosity than useful + [for example this file isn't _that_ big], but keeping the possibility in + mind helps keep the design clean. */ + +const CGEN_INSN * +xstormy16_cgen_assemble_insn (cd, str, fields, buf, errmsg) + CGEN_CPU_DESC cd; + const char *str; + CGEN_FIELDS *fields; + CGEN_INSN_BYTES_PTR buf; + char **errmsg; +{ + const char *start; + CGEN_INSN_LIST *ilist; + const char *parse_errmsg = NULL; + const char *insert_errmsg = NULL; + int recognized_mnemonic = 0; + + /* Skip leading white space. */ + while (ISSPACE (* str)) + ++ str; + + /* The instructions are stored in hashed lists. + Get the first in the list. */ + ilist = CGEN_ASM_LOOKUP_INSN (cd, str); + + /* Keep looking until we find a match. */ + start = str; + for ( ; ilist != NULL ; ilist = CGEN_ASM_NEXT_INSN (ilist)) + { + const CGEN_INSN *insn = ilist->insn; + recognized_mnemonic = 1; + +#ifdef CGEN_VALIDATE_INSN_SUPPORTED + /* Not usually needed as unsupported opcodes + shouldn't be in the hash lists. */ + /* Is this insn supported by the selected cpu? */ + if (! xstormy16_cgen_insn_supported (cd, insn)) + continue; +#endif + /* If the RELAX attribute is set, this is an insn that shouldn't be + chosen immediately. Instead, it is used during assembler/linker + relaxation if possible. */ + if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAX) != 0) + continue; + + str = start; + + /* Skip this insn if str doesn't look right lexically. */ + if (CGEN_INSN_RX (insn) != NULL && + regexec ((regex_t *) CGEN_INSN_RX (insn), str, 0, NULL, 0) == REG_NOMATCH) + continue; + + /* Allow parse/insert handlers to obtain length of insn. */ + CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn); + + parse_errmsg = CGEN_PARSE_FN (cd, insn) (cd, insn, & str, fields); + if (parse_errmsg != NULL) + continue; + + /* ??? 0 is passed for `pc'. */ + insert_errmsg = CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf, + (bfd_vma) 0); + if (insert_errmsg != NULL) + continue; + + /* It is up to the caller to actually output the insn and any + queued relocs. */ + return insn; + } + + { + static char errbuf[150]; +#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS + const char *tmp_errmsg; + + /* If requesting verbose error messages, use insert_errmsg. + Failing that, use parse_errmsg. */ + tmp_errmsg = (insert_errmsg ? insert_errmsg : + parse_errmsg ? parse_errmsg : + recognized_mnemonic ? + _("unrecognized form of instruction") : + _("unrecognized instruction")); + + if (strlen (start) > 50) + /* xgettext:c-format */ + sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start); + else + /* xgettext:c-format */ + sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start); +#else + if (strlen (start) > 50) + /* xgettext:c-format */ + sprintf (errbuf, _("bad instruction `%.50s...'"), start); + else + /* xgettext:c-format */ + sprintf (errbuf, _("bad instruction `%.50s'"), start); +#endif + + *errmsg = errbuf; + return NULL; + } +} + +#if 0 /* This calls back to GAS which we can't do without care. */ + +/* Record each member of OPVALS in the assembler's symbol table. + This lets GAS parse registers for us. + ??? Interesting idea but not currently used. */ + +/* Record each member of OPVALS in the assembler's symbol table. + FIXME: Not currently used. */ + +void +xstormy16_cgen_asm_hash_keywords (cd, opvals) + CGEN_CPU_DESC cd; + CGEN_KEYWORD *opvals; +{ + CGEN_KEYWORD_SEARCH search = cgen_keyword_search_init (opvals, NULL); + const CGEN_KEYWORD_ENTRY * ke; + + while ((ke = cgen_keyword_search_next (& search)) != NULL) + { +#if 0 /* Unnecessary, should be done in the search routine. */ + if (! xstormy16_cgen_opval_supported (ke)) + continue; +#endif + cgen_asm_record_register (cd, ke->name, ke->value); + } +} + +#endif /* 0 */ diff --git a/opcodes/xstormy16-desc.c b/opcodes/xstormy16-desc.c new file mode 100644 index 000000000..5d22acdcf --- /dev/null +++ b/opcodes/xstormy16-desc.c @@ -0,0 +1,1399 @@ +/* CPU data for xstormy16. + +THIS FILE IS MACHINE GENERATED WITH CGEN. + +Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + +This file is part of the GNU Binutils and/or GDB, the GNU debugger. + +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, 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 "sysdep.h" +#include +#include +#include "ansidecl.h" +#include "bfd.h" +#include "symcat.h" +#include "xstormy16-desc.h" +#include "xstormy16-opc.h" +#include "opintl.h" +#include "libiberty.h" + +/* Attributes. */ + +static const CGEN_ATTR_ENTRY bool_attr[] = +{ + { "#f", 0 }, + { "#t", 1 }, + { 0, 0 } +}; + +static const CGEN_ATTR_ENTRY MACH_attr[] = +{ + { "base", MACH_BASE }, + { "xstormy16", MACH_XSTORMY16 }, + { "max", MACH_MAX }, + { 0, 0 } +}; + +static const CGEN_ATTR_ENTRY ISA_attr[] = +{ + { "xstormy16", ISA_XSTORMY16 }, + { "max", ISA_MAX }, + { 0, 0 } +}; + +const CGEN_ATTR_TABLE xstormy16_cgen_ifield_attr_table[] = +{ + { "MACH", & MACH_attr[0], & MACH_attr[0] }, + { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, + { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] }, + { "ABS-ADDR", &bool_attr[0], &bool_attr[0] }, + { "RESERVED", &bool_attr[0], &bool_attr[0] }, + { "SIGN-OPT", &bool_attr[0], &bool_attr[0] }, + { "SIGNED", &bool_attr[0], &bool_attr[0] }, + { 0, 0, 0 } +}; + +const CGEN_ATTR_TABLE xstormy16_cgen_hardware_attr_table[] = +{ + { "MACH", & MACH_attr[0], & MACH_attr[0] }, + { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, + { "CACHE-ADDR", &bool_attr[0], &bool_attr[0] }, + { "PC", &bool_attr[0], &bool_attr[0] }, + { "PROFILE", &bool_attr[0], &bool_attr[0] }, + { 0, 0, 0 } +}; + +const CGEN_ATTR_TABLE xstormy16_cgen_operand_attr_table[] = +{ + { "MACH", & MACH_attr[0], & MACH_attr[0] }, + { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, + { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] }, + { "ABS-ADDR", &bool_attr[0], &bool_attr[0] }, + { "SIGN-OPT", &bool_attr[0], &bool_attr[0] }, + { "SIGNED", &bool_attr[0], &bool_attr[0] }, + { "NEGATIVE", &bool_attr[0], &bool_attr[0] }, + { "RELAX", &bool_attr[0], &bool_attr[0] }, + { "SEM-ONLY", &bool_attr[0], &bool_attr[0] }, + { 0, 0, 0 } +}; + +const CGEN_ATTR_TABLE xstormy16_cgen_insn_attr_table[] = +{ + { "MACH", & MACH_attr[0], & MACH_attr[0] }, + { "ALIAS", &bool_attr[0], &bool_attr[0] }, + { "VIRTUAL", &bool_attr[0], &bool_attr[0] }, + { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] }, + { "COND-CTI", &bool_attr[0], &bool_attr[0] }, + { "SKIP-CTI", &bool_attr[0], &bool_attr[0] }, + { "DELAY-SLOT", &bool_attr[0], &bool_attr[0] }, + { "RELAXABLE", &bool_attr[0], &bool_attr[0] }, + { "RELAX", &bool_attr[0], &bool_attr[0] }, + { "NO-DIS", &bool_attr[0], &bool_attr[0] }, + { "PBB", &bool_attr[0], &bool_attr[0] }, + { 0, 0, 0 } +}; + +/* Instruction set variants. */ + +static const CGEN_ISA xstormy16_cgen_isa_table[] = { + { "xstormy16", 32, 32, 16, 32 }, + { 0, 0, 0, 0, 0 } +}; + +/* Machine variants. */ + +static const CGEN_MACH xstormy16_cgen_mach_table[] = { + { "xstormy16", "xstormy16", MACH_XSTORMY16, 16 }, + { 0, 0, 0, 0 } +}; + +static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_gr_names_entries[] = +{ + { "r0", 0, {0, {0}}, 0, 0 }, + { "r1", 1, {0, {0}}, 0, 0 }, + { "r2", 2, {0, {0}}, 0, 0 }, + { "r3", 3, {0, {0}}, 0, 0 }, + { "r4", 4, {0, {0}}, 0, 0 }, + { "r5", 5, {0, {0}}, 0, 0 }, + { "r6", 6, {0, {0}}, 0, 0 }, + { "r7", 7, {0, {0}}, 0, 0 }, + { "r8", 8, {0, {0}}, 0, 0 }, + { "r9", 9, {0, {0}}, 0, 0 }, + { "r10", 10, {0, {0}}, 0, 0 }, + { "r11", 11, {0, {0}}, 0, 0 }, + { "r12", 12, {0, {0}}, 0, 0 }, + { "r13", 13, {0, {0}}, 0, 0 }, + { "r14", 14, {0, {0}}, 0, 0 }, + { "r15", 15, {0, {0}}, 0, 0 }, + { "psw", 14, {0, {0}}, 0, 0 }, + { "sp", 15, {0, {0}}, 0, 0 } +}; + +CGEN_KEYWORD xstormy16_cgen_opval_gr_names = +{ + & xstormy16_cgen_opval_gr_names_entries[0], + 18, + 0, 0, 0, 0, "" +}; + +static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_gr_Rbj_names_entries[] = +{ + { "r8", 0, {0, {0}}, 0, 0 }, + { "r9", 1, {0, {0}}, 0, 0 } +}; + +CGEN_KEYWORD xstormy16_cgen_opval_gr_Rbj_names = +{ + & xstormy16_cgen_opval_gr_Rbj_names_entries[0], + 2, + 0, 0, 0, 0, "" +}; + +static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_h_branchcond_entries[] = +{ + { "ge", 0, {0, {0}}, 0, 0 }, + { "nc", 1, {0, {0}}, 0, 0 }, + { "lt", 2, {0, {0}}, 0, 0 }, + { "c", 3, {0, {0}}, 0, 0 }, + { "gt", 4, {0, {0}}, 0, 0 }, + { "hi", 5, {0, {0}}, 0, 0 }, + { "le", 6, {0, {0}}, 0, 0 }, + { "ls", 7, {0, {0}}, 0, 0 }, + { "pl", 8, {0, {0}}, 0, 0 }, + { "nv", 9, {0, {0}}, 0, 0 }, + { "mi", 10, {0, {0}}, 0, 0 }, + { "v", 11, {0, {0}}, 0, 0 }, + { "nz.b", 12, {0, {0}}, 0, 0 }, + { "nz", 13, {0, {0}}, 0, 0 }, + { "z.b", 14, {0, {0}}, 0, 0 }, + { "z", 15, {0, {0}}, 0, 0 } +}; + +CGEN_KEYWORD xstormy16_cgen_opval_h_branchcond = +{ + & xstormy16_cgen_opval_h_branchcond_entries[0], + 16, + 0, 0, 0, 0, "" +}; + +static CGEN_KEYWORD_ENTRY xstormy16_cgen_opval_h_wordsize_entries[] = +{ + { ".b", 0, {0, {0}}, 0, 0 }, + { ".w", 1, {0, {0}}, 0, 0 }, + { "", 1, {0, {0}}, 0, 0 } +}; + +CGEN_KEYWORD xstormy16_cgen_opval_h_wordsize = +{ + & xstormy16_cgen_opval_h_wordsize_entries[0], + 3, + 0, 0, 0, 0, "" +}; + + +/* The hardware table. */ + +#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) +#define A(a) (1 << CGEN_HW_##a) +#else +#define A(a) (1 << CGEN_HW_/**/a) +#endif + +const CGEN_HW_ENTRY xstormy16_cgen_hw_table[] = +{ + { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { (1<name) + { + if (strcmp (name, table->bfd_name) == 0) + return table; + ++table; + } + abort (); +} + +/* Subroutine of xstormy16_cgen_cpu_open to build the hardware table. */ + +static void +build_hw_table (cd) + CGEN_CPU_TABLE *cd; +{ + int i; + int machs = cd->machs; + const CGEN_HW_ENTRY *init = & xstormy16_cgen_hw_table[0]; + /* MAX_HW is only an upper bound on the number of selected entries. + However each entry is indexed by it's enum so there can be holes in + the table. */ + const CGEN_HW_ENTRY **selected = + (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *)); + + cd->hw_table.init_entries = init; + cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY); + memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *)); + /* ??? For now we just use machs to determine which ones we want. */ + for (i = 0; init[i].name != NULL; ++i) + if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH) + & machs) + selected[init[i].type] = &init[i]; + cd->hw_table.entries = selected; + cd->hw_table.num_entries = MAX_HW; +} + +/* Subroutine of xstormy16_cgen_cpu_open to build the hardware table. */ + +static void +build_ifield_table (cd) + CGEN_CPU_TABLE *cd; +{ + cd->ifld_table = & xstormy16_cgen_ifld_table[0]; +} + +/* Subroutine of xstormy16_cgen_cpu_open to build the hardware table. */ + +static void +build_operand_table (cd) + CGEN_CPU_TABLE *cd; +{ + int i; + int machs = cd->machs; + const CGEN_OPERAND *init = & xstormy16_cgen_operand_table[0]; + /* MAX_OPERANDS is only an upper bound on the number of selected entries. + However each entry is indexed by it's enum so there can be holes in + the table. */ + const CGEN_OPERAND **selected = + (const CGEN_OPERAND **) xmalloc (MAX_OPERANDS * sizeof (CGEN_OPERAND *)); + + cd->operand_table.init_entries = init; + cd->operand_table.entry_size = sizeof (CGEN_OPERAND); + memset (selected, 0, MAX_OPERANDS * sizeof (CGEN_OPERAND *)); + /* ??? For now we just use mach to determine which ones we want. */ + for (i = 0; init[i].name != NULL; ++i) + if (CGEN_OPERAND_ATTR_VALUE (&init[i], CGEN_OPERAND_MACH) + & machs) + selected[init[i].type] = &init[i]; + cd->operand_table.entries = selected; + cd->operand_table.num_entries = MAX_OPERANDS; +} + +/* Subroutine of xstormy16_cgen_cpu_open to build the hardware table. + ??? This could leave out insns not supported by the specified mach/isa, + but that would cause errors like "foo only supported by bar" to become + "unknown insn", so for now we include all insns and require the app to + do the checking later. + ??? On the other hand, parsing of such insns may require their hardware or + operand elements to be in the table [which they mightn't be]. */ + +static void +build_insn_table (cd) + CGEN_CPU_TABLE *cd; +{ + int i; + const CGEN_IBASE *ib = & xstormy16_cgen_insn_table[0]; + CGEN_INSN *insns = (CGEN_INSN *) xmalloc (MAX_INSNS * sizeof (CGEN_INSN)); + + memset (insns, 0, MAX_INSNS * sizeof (CGEN_INSN)); + for (i = 0; i < MAX_INSNS; ++i) + insns[i].base = &ib[i]; + cd->insn_table.init_entries = insns; + cd->insn_table.entry_size = sizeof (CGEN_IBASE); + cd->insn_table.num_init_entries = MAX_INSNS; +} + +/* Subroutine of xstormy16_cgen_cpu_open to rebuild the tables. */ + +static void +xstormy16_cgen_rebuild_tables (cd) + CGEN_CPU_TABLE *cd; +{ + int i; + unsigned int isas = cd->isas; + unsigned int machs = cd->machs; + + cd->int_insn_p = CGEN_INT_INSN_P; + + /* Data derived from the isa spec. */ +#define UNSET (CGEN_SIZE_UNKNOWN + 1) + cd->default_insn_bitsize = UNSET; + cd->base_insn_bitsize = UNSET; + cd->min_insn_bitsize = 65535; /* some ridiculously big number */ + cd->max_insn_bitsize = 0; + for (i = 0; i < MAX_ISAS; ++i) + if (((1 << i) & isas) != 0) + { + const CGEN_ISA *isa = & xstormy16_cgen_isa_table[i]; + + /* Default insn sizes of all selected isas must be + equal or we set the result to 0, meaning "unknown". */ + if (cd->default_insn_bitsize == UNSET) + cd->default_insn_bitsize = isa->default_insn_bitsize; + else if (isa->default_insn_bitsize == cd->default_insn_bitsize) + ; /* this is ok */ + else + cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN; + + /* Base insn sizes of all selected isas must be equal + or we set the result to 0, meaning "unknown". */ + if (cd->base_insn_bitsize == UNSET) + cd->base_insn_bitsize = isa->base_insn_bitsize; + else if (isa->base_insn_bitsize == cd->base_insn_bitsize) + ; /* this is ok */ + else + cd->base_insn_bitsize = CGEN_SIZE_UNKNOWN; + + /* Set min,max insn sizes. */ + if (isa->min_insn_bitsize < cd->min_insn_bitsize) + cd->min_insn_bitsize = isa->min_insn_bitsize; + if (isa->max_insn_bitsize > cd->max_insn_bitsize) + cd->max_insn_bitsize = isa->max_insn_bitsize; + } + + /* Data derived from the mach spec. */ + for (i = 0; i < MAX_MACHS; ++i) + if (((1 << i) & machs) != 0) + { + const CGEN_MACH *mach = & xstormy16_cgen_mach_table[i]; + + if (mach->insn_chunk_bitsize != 0) + { + if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize) + { + fprintf (stderr, "xstormy16_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n", + cd->insn_chunk_bitsize, mach->insn_chunk_bitsize); + abort (); + } + + cd->insn_chunk_bitsize = mach->insn_chunk_bitsize; + } + } + + /* Determine which hw elements are used by MACH. */ + build_hw_table (cd); + + /* Build the ifield table. */ + build_ifield_table (cd); + + /* Determine which operands are used by MACH/ISA. */ + build_operand_table (cd); + + /* Build the instruction table. */ + build_insn_table (cd); +} + +/* Initialize a cpu table and return a descriptor. + It's much like opening a file, and must be the first function called. + The arguments are a set of (type/value) pairs, terminated with + CGEN_CPU_OPEN_END. + + Currently supported values: + CGEN_CPU_OPEN_ISAS: bitmap of values in enum isa_attr + CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr + CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name + CGEN_CPU_OPEN_ENDIAN: specify endian choice + CGEN_CPU_OPEN_END: terminates arguments + + ??? Simultaneous multiple isas might not make sense, but it's not (yet) + precluded. + + ??? We only support ISO C stdargs here, not K&R. + Laziness, plus experiment to see if anything requires K&R - eventually + K&R will no longer be supported - e.g. GDB is currently trying this. */ + +CGEN_CPU_DESC +xstormy16_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...) +{ + CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE)); + static int init_p; + unsigned int isas = 0; /* 0 = "unspecified" */ + unsigned int machs = 0; /* 0 = "unspecified" */ + enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN; + va_list ap; + + if (! init_p) + { + init_tables (); + init_p = 1; + } + + memset (cd, 0, sizeof (*cd)); + + va_start (ap, arg_type); + while (arg_type != CGEN_CPU_OPEN_END) + { + switch (arg_type) + { + case CGEN_CPU_OPEN_ISAS : + isas = va_arg (ap, unsigned int); + break; + case CGEN_CPU_OPEN_MACHS : + machs = va_arg (ap, unsigned int); + break; + case CGEN_CPU_OPEN_BFDMACH : + { + const char *name = va_arg (ap, const char *); + const CGEN_MACH *mach = + lookup_mach_via_bfd_name (xstormy16_cgen_mach_table, name); + + machs |= 1 << mach->num; + break; + } + case CGEN_CPU_OPEN_ENDIAN : + endian = va_arg (ap, enum cgen_endian); + break; + default : + fprintf (stderr, "xstormy16_cgen_cpu_open: unsupported argument `%d'\n", + arg_type); + abort (); /* ??? return NULL? */ + } + arg_type = va_arg (ap, enum cgen_cpu_open_arg); + } + va_end (ap); + + /* mach unspecified means "all" */ + if (machs == 0) + machs = (1 << MAX_MACHS) - 1; + /* base mach is always selected */ + machs |= 1; + /* isa unspecified means "all" */ + if (isas == 0) + isas = (1 << MAX_ISAS) - 1; + if (endian == CGEN_ENDIAN_UNKNOWN) + { + /* ??? If target has only one, could have a default. */ + fprintf (stderr, "xstormy16_cgen_cpu_open: no endianness specified\n"); + abort (); + } + + cd->isas = isas; + cd->machs = machs; + cd->endian = endian; + /* FIXME: for the sparc case we can determine insn-endianness statically. + The worry here is where both data and insn endian can be independently + chosen, in which case this function will need another argument. + Actually, will want to allow for more arguments in the future anyway. */ + cd->insn_endian = endian; + + /* Table (re)builder. */ + cd->rebuild_tables = xstormy16_cgen_rebuild_tables; + xstormy16_cgen_rebuild_tables (cd); + + /* Default to not allowing signed overflow. */ + cd->signed_overflow_ok_p = 0; + + return (CGEN_CPU_DESC) cd; +} + +/* Cover fn to xstormy16_cgen_cpu_open to handle the simple case of 1 isa, 1 mach. + MACH_NAME is the bfd name of the mach. */ + +CGEN_CPU_DESC +xstormy16_cgen_cpu_open_1 (mach_name, endian) + const char *mach_name; + enum cgen_endian endian; +{ + return xstormy16_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name, + CGEN_CPU_OPEN_ENDIAN, endian, + CGEN_CPU_OPEN_END); +} + +/* Close a cpu table. + ??? This can live in a machine independent file, but there's currently + no place to put this file (there's no libcgen). libopcodes is the wrong + place as some simulator ports use this but they don't use libopcodes. */ + +void +xstormy16_cgen_cpu_close (cd) + CGEN_CPU_DESC cd; +{ + if (cd->insn_table.init_entries) + free ((CGEN_INSN *) cd->insn_table.init_entries); + if (cd->hw_table.entries) + free ((CGEN_HW_ENTRY *) cd->hw_table.entries); + free (cd); +} + diff --git a/opcodes/xstormy16-desc.h b/opcodes/xstormy16-desc.h new file mode 100644 index 000000000..c00ca79e2 --- /dev/null +++ b/opcodes/xstormy16-desc.h @@ -0,0 +1,289 @@ +/* CPU data header for xstormy16. + +THIS FILE IS MACHINE GENERATED WITH CGEN. + +Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + +This file is part of the GNU Binutils and/or GDB, the GNU debugger. + +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, 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. + +*/ + +#ifndef XSTORMY16_CPU_H +#define XSTORMY16_CPU_H + +#define CGEN_ARCH xstormy16 + +/* Given symbol S, return xstormy16_cgen_. */ +#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) +#define CGEN_SYM(s) xstormy16##_cgen_##s +#else +#define CGEN_SYM(s) xstormy16/**/_cgen_/**/s +#endif + + +/* Selected cpu families. */ +#define HAVE_CPU_XSTORMY16 + +#define CGEN_INSN_LSB0_P 0 + +/* Minimum size of any insn (in bytes). */ +#define CGEN_MIN_INSN_SIZE 2 + +/* Maximum size of any insn (in bytes). */ +#define CGEN_MAX_INSN_SIZE 4 + +#define CGEN_INT_INSN_P 1 + +/* Maximum number of syntax elements in an instruction. */ +#define CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS 19 + +/* CGEN_MNEMONIC_OPERANDS is defined if mnemonics have operands. + e.g. In "b,a foo" the ",a" is an operand. If mnemonics have operands + we can't hash on everything up to the space. */ +#define CGEN_MNEMONIC_OPERANDS + +/* Maximum number of fields in an instruction. */ +#define CGEN_ACTUAL_MAX_IFMT_OPERANDS 9 + +/* Enums. */ + +/* Enum declaration for . */ +typedef enum gr_names { + H_GR_R0 = 0, H_GR_R1 = 1, H_GR_R2 = 2, H_GR_R3 = 3 + , H_GR_R4 = 4, H_GR_R5 = 5, H_GR_R6 = 6, H_GR_R7 = 7 + , H_GR_R8 = 8, H_GR_R9 = 9, H_GR_R10 = 10, H_GR_R11 = 11 + , H_GR_R12 = 12, H_GR_R13 = 13, H_GR_R14 = 14, H_GR_R15 = 15 + , H_GR_PSW = 14, H_GR_SP = 15 +} GR_NAMES; + +/* Enum declaration for . */ +typedef enum gr_rbj_names { + H_RBJ_R8, H_RBJ_R9 +} GR_RBJ_NAMES; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op1 { + OP1_0, OP1_1, OP1_2, OP1_3 + , OP1_4, OP1_5, OP1_6, OP1_7 + , OP1_8, OP1_9, OP1_A, OP1_B + , OP1_C, OP1_D, OP1_E, OP1_F +} INSN_OP1; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op2 { + OP2_0, OP2_1, OP2_2, OP2_3 + , OP2_4, OP2_5, OP2_6, OP2_7 + , OP2_8, OP2_9, OP2_A, OP2_B + , OP2_C, OP2_D, OP2_E, OP2_F +} INSN_OP2; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op2a { + OP2A_0, OP2A_2, OP2A_4, OP2A_6 + , OP2A_8, OP2A_A, OP2A_C, OP2A_E +} INSN_OP2A; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op2m { + OP2M_0, OP2M_1 +} INSN_OP2M; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op3 { + OP3_0, OP3_1, OP3_2, OP3_3 + , OP3_4, OP3_5, OP3_6, OP3_7 + , OP3_8, OP3_9, OP3_A, OP3_B + , OP3_C, OP3_D, OP3_E, OP3_F +} INSN_OP3; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op3a { + OP3A_0, OP3A_1, OP3A_2, OP3A_3 +} INSN_OP3A; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op3b { + OP3B_0, OP3B_2, OP3B_4, OP3B_6 + , OP3B_8, OP3B_A, OP3B_C, OP3B_E +} INSN_OP3B; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op4 { + OP4_0, OP4_1, OP4_2, OP4_3 + , OP4_4, OP4_5, OP4_6, OP4_7 + , OP4_8, OP4_9, OP4_A, OP4_B + , OP4_C, OP4_D, OP4_E, OP4_F +} INSN_OP4; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op4m { + OP4M_0, OP4M_1 +} INSN_OP4M; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op4b { + OP4B_0, OP4B_1 +} INSN_OP4B; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op5 { + OP5_0, OP5_1, OP5_2, OP5_3 + , OP5_4, OP5_5, OP5_6, OP5_7 + , OP5_8, OP5_9, OP5_A, OP5_B + , OP5_C, OP5_D, OP5_E, OP5_F +} INSN_OP5; + +/* Enum declaration for insn op enums. */ +typedef enum insn_op5a { + OP5A_0, OP5A_1 +} INSN_OP5A; + +/* Attributes. */ + +/* Enum declaration for machine type selection. */ +typedef enum mach_attr { + MACH_BASE, MACH_XSTORMY16, MACH_MAX +} MACH_ATTR; + +/* Enum declaration for instruction set selection. */ +typedef enum isa_attr { + ISA_XSTORMY16, ISA_MAX +} ISA_ATTR; + +/* Number of architecture variants. */ +#define MAX_ISAS 1 +#define MAX_MACHS ((int) MACH_MAX) + +/* Ifield support. */ + +extern const struct cgen_ifld xstormy16_cgen_ifld_table[]; + +/* Ifield attribute indices. */ + +/* Enum declaration for cgen_ifld attrs. */ +typedef enum cgen_ifld_attr { + CGEN_IFLD_VIRTUAL, CGEN_IFLD_PCREL_ADDR, CGEN_IFLD_ABS_ADDR, CGEN_IFLD_RESERVED + , CGEN_IFLD_SIGN_OPT, CGEN_IFLD_SIGNED, CGEN_IFLD_END_BOOLS, CGEN_IFLD_START_NBOOLS = 31 + , CGEN_IFLD_MACH, CGEN_IFLD_END_NBOOLS +} CGEN_IFLD_ATTR; + +/* Number of non-boolean elements in cgen_ifld_attr. */ +#define CGEN_IFLD_NBOOL_ATTRS (CGEN_IFLD_END_NBOOLS - CGEN_IFLD_START_NBOOLS - 1) + +/* Enum declaration for xstormy16 ifield types. */ +typedef enum ifield_type { + XSTORMY16_F_NIL, XSTORMY16_F_ANYOF, XSTORMY16_F_RD, XSTORMY16_F_RDM + , XSTORMY16_F_RM, XSTORMY16_F_RS, XSTORMY16_F_RB, XSTORMY16_F_RBJ + , XSTORMY16_F_OP1, XSTORMY16_F_OP2, XSTORMY16_F_OP2A, XSTORMY16_F_OP2M + , XSTORMY16_F_OP3, XSTORMY16_F_OP3A, XSTORMY16_F_OP3B, XSTORMY16_F_OP4 + , XSTORMY16_F_OP4M, XSTORMY16_F_OP4B, XSTORMY16_F_OP5, XSTORMY16_F_OP5A + , XSTORMY16_F_OP, XSTORMY16_F_IMM2, XSTORMY16_F_IMM3, XSTORMY16_F_IMM3B + , XSTORMY16_F_IMM4, XSTORMY16_F_IMM8, XSTORMY16_F_IMM12, XSTORMY16_F_IMM16 + , XSTORMY16_F_LMEM8, XSTORMY16_F_HMEM8, XSTORMY16_F_REL8_2, XSTORMY16_F_REL8_4 + , XSTORMY16_F_REL12, XSTORMY16_F_REL12A, XSTORMY16_F_ABS24_1, XSTORMY16_F_ABS24_2 + , XSTORMY16_F_ABS24, XSTORMY16_F_MAX +} IFIELD_TYPE; + +#define MAX_IFLD ((int) XSTORMY16_F_MAX) + +/* Hardware attribute indices. */ + +/* Enum declaration for cgen_hw attrs. */ +typedef enum cgen_hw_attr { + CGEN_HW_VIRTUAL, CGEN_HW_CACHE_ADDR, CGEN_HW_PC, CGEN_HW_PROFILE + , CGEN_HW_END_BOOLS, CGEN_HW_START_NBOOLS = 31, CGEN_HW_MACH, CGEN_HW_END_NBOOLS +} CGEN_HW_ATTR; + +/* Number of non-boolean elements in cgen_hw_attr. */ +#define CGEN_HW_NBOOL_ATTRS (CGEN_HW_END_NBOOLS - CGEN_HW_START_NBOOLS - 1) + +/* Enum declaration for xstormy16 hardware types. */ +typedef enum cgen_hw_type { + HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR + , HW_H_IADDR, HW_H_PC, HW_H_GR, HW_H_RBJ + , HW_H_RPSW, HW_H_Z8, HW_H_Z16, HW_H_CY + , HW_H_HC, HW_H_OV, HW_H_PT, HW_H_S + , HW_H_BRANCHCOND, HW_H_WORDSIZE, HW_MAX +} CGEN_HW_TYPE; + +#define MAX_HW ((int) HW_MAX) + +/* Operand attribute indices. */ + +/* Enum declaration for cgen_operand attrs. */ +typedef enum cgen_operand_attr { + CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT + , CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY + , CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH, CGEN_OPERAND_END_NBOOLS +} CGEN_OPERAND_ATTR; + +/* Number of non-boolean elements in cgen_operand_attr. */ +#define CGEN_OPERAND_NBOOL_ATTRS (CGEN_OPERAND_END_NBOOLS - CGEN_OPERAND_START_NBOOLS - 1) + +/* Enum declaration for xstormy16 operand types. */ +typedef enum cgen_operand_type { + XSTORMY16_OPERAND_PC, XSTORMY16_OPERAND_PSW_Z8, XSTORMY16_OPERAND_PSW_Z16, XSTORMY16_OPERAND_PSW_CY + , XSTORMY16_OPERAND_PSW_HC, XSTORMY16_OPERAND_PSW_OV, XSTORMY16_OPERAND_PSW_PT, XSTORMY16_OPERAND_PSW_S + , XSTORMY16_OPERAND_RD, XSTORMY16_OPERAND_RDM, XSTORMY16_OPERAND_RM, XSTORMY16_OPERAND_RS + , XSTORMY16_OPERAND_RB, XSTORMY16_OPERAND_RBJ, XSTORMY16_OPERAND_BCOND2, XSTORMY16_OPERAND_WS2 + , XSTORMY16_OPERAND_BCOND5, XSTORMY16_OPERAND_IMM2, XSTORMY16_OPERAND_IMM3, XSTORMY16_OPERAND_IMM3B + , XSTORMY16_OPERAND_IMM4, XSTORMY16_OPERAND_IMM8, XSTORMY16_OPERAND_IMM8SMALL, XSTORMY16_OPERAND_IMM12 + , XSTORMY16_OPERAND_IMM16, XSTORMY16_OPERAND_LMEM8, XSTORMY16_OPERAND_HMEM8, XSTORMY16_OPERAND_REL8_2 + , XSTORMY16_OPERAND_REL8_4, XSTORMY16_OPERAND_REL12, XSTORMY16_OPERAND_REL12A, XSTORMY16_OPERAND_ABS24 + , XSTORMY16_OPERAND_PSW, XSTORMY16_OPERAND_RPSW, XSTORMY16_OPERAND_SP, XSTORMY16_OPERAND_R0 + , XSTORMY16_OPERAND_R1, XSTORMY16_OPERAND_R2, XSTORMY16_OPERAND_R8, XSTORMY16_OPERAND_MAX +} CGEN_OPERAND_TYPE; + +/* Number of operands types. */ +#define MAX_OPERANDS 39 + +/* Maximum number of operands referenced by any insn. */ +#define MAX_OPERAND_INSTANCES 8 + +/* Insn attribute indices. */ + +/* Enum declaration for cgen_insn attrs. */ +typedef enum cgen_insn_attr { + CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI + , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX + , CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31 + , CGEN_INSN_MACH, CGEN_INSN_END_NBOOLS +} CGEN_INSN_ATTR; + +/* Number of non-boolean elements in cgen_insn_attr. */ +#define CGEN_INSN_NBOOL_ATTRS (CGEN_INSN_END_NBOOLS - CGEN_INSN_START_NBOOLS - 1) + +/* cgen.h uses things we just defined. */ +#include "opcode/cgen.h" + +/* Attributes. */ +extern const CGEN_ATTR_TABLE xstormy16_cgen_hardware_attr_table[]; +extern const CGEN_ATTR_TABLE xstormy16_cgen_ifield_attr_table[]; +extern const CGEN_ATTR_TABLE xstormy16_cgen_operand_attr_table[]; +extern const CGEN_ATTR_TABLE xstormy16_cgen_insn_attr_table[]; + +/* Hardware decls. */ + +extern CGEN_KEYWORD xstormy16_cgen_opval_gr_names; +extern CGEN_KEYWORD xstormy16_cgen_opval_gr_Rbj_names; +extern CGEN_KEYWORD xstormy16_cgen_opval_h_branchcond; +extern CGEN_KEYWORD xstormy16_cgen_opval_h_wordsize; + + + + +#endif /* XSTORMY16_CPU_H */ diff --git a/opcodes/xstormy16-dis.c b/opcodes/xstormy16-dis.c new file mode 100644 index 000000000..595ed2aa5 --- /dev/null +++ b/opcodes/xstormy16-dis.c @@ -0,0 +1,565 @@ +/* Disassembler interface for targets using CGEN. -*- C -*- + CGEN: Cpu tools GENerator + +THIS FILE IS MACHINE GENERATED WITH CGEN. +- the resultant file is machine generated, cgen-dis.in isn't + +Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + +This file is part of the GNU Binutils and GDB, the GNU debugger. + +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, 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. */ + +/* ??? Eventually more and more of this stuff can go to cpu-independent files. + Keep that in mind. */ + +#include "sysdep.h" +#include +#include "ansidecl.h" +#include "dis-asm.h" +#include "bfd.h" +#include "symcat.h" +#include "xstormy16-desc.h" +#include "xstormy16-opc.h" +#include "opintl.h" + +/* Default text to print if an instruction isn't recognized. */ +#define UNKNOWN_INSN_MSG _("*unknown*") + +static void print_normal + PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned int, bfd_vma, int)); +static void print_address + PARAMS ((CGEN_CPU_DESC, PTR, bfd_vma, unsigned int, bfd_vma, int)); +static void print_keyword + PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int)); +static void print_insn_normal + PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *, + bfd_vma, int)); +static int print_insn + PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned)); +static int default_print_insn + PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *)); +static int read_insn + PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int, + CGEN_EXTRACT_INFO *, unsigned long *)); + +/* -- disassembler routines inserted here */ + + +void xstormy16_cgen_print_operand + PARAMS ((CGEN_CPU_DESC, int, PTR, CGEN_FIELDS *, + void const *, bfd_vma, int)); + +/* Main entry point for printing operands. + XINFO is a `void *' and not a `disassemble_info *' to not put a requirement + of dis-asm.h on cgen.h. + + This function is basically just a big switch statement. Earlier versions + used tables to look up the function to use, but + - if the table contains both assembler and disassembler functions then + the disassembler contains much of the assembler and vice-versa, + - there's a lot of inlining possibilities as things grow, + - using a switch statement avoids the function call overhead. + + This function could be moved into `print_insn_normal', but keeping it + separate makes clear the interface between `print_insn_normal' and each of + the handlers. */ + +void +xstormy16_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length) + CGEN_CPU_DESC cd; + int opindex; + PTR xinfo; + CGEN_FIELDS *fields; + void const *attrs ATTRIBUTE_UNUSED; + bfd_vma pc; + int length; +{ + disassemble_info *info = (disassemble_info *) xinfo; + + switch (opindex) + { + case XSTORMY16_OPERAND_RB : + print_keyword (cd, info, & xstormy16_cgen_opval_gr_names, fields->f_Rb, 0); + break; + case XSTORMY16_OPERAND_RBJ : + print_keyword (cd, info, & xstormy16_cgen_opval_gr_Rbj_names, fields->f_Rbj, 0); + break; + case XSTORMY16_OPERAND_RD : + print_keyword (cd, info, & xstormy16_cgen_opval_gr_names, fields->f_Rd, 0); + break; + case XSTORMY16_OPERAND_RDM : + print_keyword (cd, info, & xstormy16_cgen_opval_gr_names, fields->f_Rdm, 0); + break; + case XSTORMY16_OPERAND_RM : + print_keyword (cd, info, & xstormy16_cgen_opval_gr_names, fields->f_Rm, 0); + break; + case XSTORMY16_OPERAND_RS : + print_keyword (cd, info, & xstormy16_cgen_opval_gr_names, fields->f_Rs, 0); + break; + case XSTORMY16_OPERAND_ABS24 : + print_normal (cd, info, fields->f_abs24, 0|(1<f_op2, 0); + break; + case XSTORMY16_OPERAND_BCOND5 : + print_keyword (cd, info, & xstormy16_cgen_opval_h_branchcond, fields->f_op5, 0); + break; + case XSTORMY16_OPERAND_HMEM8 : + print_normal (cd, info, fields->f_hmem8, 0|(1<f_imm12, 0|(1<f_imm16, 0|(1<f_imm2, 0, pc, length); + break; + case XSTORMY16_OPERAND_IMM3 : + print_normal (cd, info, fields->f_imm3, 0, pc, length); + break; + case XSTORMY16_OPERAND_IMM3B : + print_normal (cd, info, fields->f_imm3b, 0, pc, length); + break; + case XSTORMY16_OPERAND_IMM4 : + print_normal (cd, info, fields->f_imm4, 0, pc, length); + break; + case XSTORMY16_OPERAND_IMM8 : + print_normal (cd, info, fields->f_imm8, 0, pc, length); + break; + case XSTORMY16_OPERAND_IMM8SMALL : + print_normal (cd, info, fields->f_imm8, 0, pc, length); + break; + case XSTORMY16_OPERAND_LMEM8 : + print_normal (cd, info, fields->f_lmem8, 0|(1<f_rel12, 0|(1<f_rel12a, 0|(1<f_rel8_2, 0|(1<f_rel8_4, 0|(1<f_op2m, 0); + break; + + default : + /* xgettext:c-format */ + fprintf (stderr, _("Unrecognized field %d while printing insn.\n"), + opindex); + abort (); + } +} + +cgen_print_fn * const xstormy16_cgen_print_handlers[] = +{ + print_insn_normal, +}; + + +void +xstormy16_cgen_init_dis (cd) + CGEN_CPU_DESC cd; +{ + xstormy16_cgen_init_opcode_table (cd); + xstormy16_cgen_init_ibld_table (cd); + cd->print_handlers = & xstormy16_cgen_print_handlers[0]; + cd->print_operand = xstormy16_cgen_print_operand; +} + + +/* Default print handler. */ + +static void +print_normal (cd, dis_info, value, attrs, pc, length) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + PTR dis_info; + long value; + unsigned int attrs; + bfd_vma pc ATTRIBUTE_UNUSED; + int length ATTRIBUTE_UNUSED; +{ + disassemble_info *info = (disassemble_info *) dis_info; + +#ifdef CGEN_PRINT_NORMAL + CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length); +#endif + + /* Print the operand as directed by the attributes. */ + if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY)) + ; /* nothing to do */ + else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED)) + (*info->fprintf_func) (info->stream, "%ld", value); + else + (*info->fprintf_func) (info->stream, "0x%lx", value); +} + +/* Default address handler. */ + +static void +print_address (cd, dis_info, value, attrs, pc, length) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + PTR dis_info; + bfd_vma value; + unsigned int attrs; + bfd_vma pc ATTRIBUTE_UNUSED; + int length ATTRIBUTE_UNUSED; +{ + disassemble_info *info = (disassemble_info *) dis_info; + +#ifdef CGEN_PRINT_ADDRESS + CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length); +#endif + + /* Print the operand as directed by the attributes. */ + if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY)) + ; /* nothing to do */ + else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_PCREL_ADDR)) + (*info->print_address_func) (value, info); + else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_ABS_ADDR)) + (*info->print_address_func) (value, info); + else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED)) + (*info->fprintf_func) (info->stream, "%ld", (long) value); + else + (*info->fprintf_func) (info->stream, "0x%lx", (long) value); +} + +/* Keyword print handler. */ + +static void +print_keyword (cd, dis_info, keyword_table, value, attrs) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + PTR dis_info; + CGEN_KEYWORD *keyword_table; + long value; + unsigned int attrs ATTRIBUTE_UNUSED; +{ + disassemble_info *info = (disassemble_info *) dis_info; + const CGEN_KEYWORD_ENTRY *ke; + + ke = cgen_keyword_lookup_value (keyword_table, value); + if (ke != NULL) + (*info->fprintf_func) (info->stream, "%s", ke->name); + else + (*info->fprintf_func) (info->stream, "???"); +} + +/* Default insn printer. + + DIS_INFO is defined as `PTR' so the disassembler needn't know anything + about disassemble_info. */ + +static void +print_insn_normal (cd, dis_info, insn, fields, pc, length) + CGEN_CPU_DESC cd; + PTR dis_info; + const CGEN_INSN *insn; + CGEN_FIELDS *fields; + bfd_vma pc; + int length; +{ + const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); + disassemble_info *info = (disassemble_info *) dis_info; + const CGEN_SYNTAX_CHAR_TYPE *syn; + + CGEN_INIT_PRINT (cd); + + for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn) + { + if (CGEN_SYNTAX_MNEMONIC_P (*syn)) + { + (*info->fprintf_func) (info->stream, "%s", CGEN_INSN_MNEMONIC (insn)); + continue; + } + if (CGEN_SYNTAX_CHAR_P (*syn)) + { + (*info->fprintf_func) (info->stream, "%c", CGEN_SYNTAX_CHAR (*syn)); + continue; + } + + /* We have an operand. */ + xstormy16_cgen_print_operand (cd, CGEN_SYNTAX_FIELD (*syn), info, + fields, CGEN_INSN_ATTRS (insn), pc, length); + } +} + +/* Subroutine of print_insn. Reads an insn into the given buffers and updates + the extract info. + Returns 0 if all is well, non-zero otherwise. */ + +static int +read_insn (cd, pc, info, buf, buflen, ex_info, insn_value) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + bfd_vma pc; + disassemble_info *info; + char *buf; + int buflen; + CGEN_EXTRACT_INFO *ex_info; + unsigned long *insn_value; +{ + int status = (*info->read_memory_func) (pc, buf, buflen, info); + if (status != 0) + { + (*info->memory_error_func) (status, pc, info); + return -1; + } + + ex_info->dis_info = info; + ex_info->valid = (1 << buflen) - 1; + ex_info->insn_bytes = buf; + + *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG); + return 0; +} + +/* Utility to print an insn. + BUF is the base part of the insn, target byte order, BUFLEN bytes long. + The result is the size of the insn in bytes or zero for an unknown insn + or -1 if an error occurs fetching data (memory_error_func will have + been called). */ + +static int +print_insn (cd, pc, info, buf, buflen) + CGEN_CPU_DESC cd; + bfd_vma pc; + disassemble_info *info; + char *buf; + unsigned int buflen; +{ + CGEN_INSN_INT insn_value; + const CGEN_INSN_LIST *insn_list; + CGEN_EXTRACT_INFO ex_info; + + /* Extract base part of instruction, just in case CGEN_DIS_* uses it. */ + insn_value = cgen_get_insn_value (cd, buf, buflen * 8); + + /* Fill in ex_info fields like read_insn would. Don't actually call + read_insn, since the incoming buffer is already read (and possibly + modified a la m32r). */ + ex_info.valid = (1 << buflen) - 1; + ex_info.dis_info = info; + ex_info.insn_bytes = buf; + + /* The instructions are stored in hash lists. + Pick the first one and keep trying until we find the right one. */ + + insn_list = CGEN_DIS_LOOKUP_INSN (cd, buf, insn_value); + while (insn_list != NULL) + { + const CGEN_INSN *insn = insn_list->insn; + CGEN_FIELDS fields; + int length; + unsigned long insn_value_cropped; + +#ifdef CGEN_VALIDATE_INSN_SUPPORTED + /* Not needed as insn shouldn't be in hash lists if not supported. */ + /* Supported by this cpu? */ + if (! xstormy16_cgen_insn_supported (cd, insn)) + { + insn_list = CGEN_DIS_NEXT_INSN (insn_list); + continue; + } +#endif + + /* Basic bit mask must be correct. */ + /* ??? May wish to allow target to defer this check until the extract + handler. */ + + /* Base size may exceed this instruction's size. Extract the + relevant part from the buffer. */ + if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen && + (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long)) + insn_value_cropped = bfd_get_bits (buf, CGEN_INSN_BITSIZE (insn), + info->endian == BFD_ENDIAN_BIG); + else + insn_value_cropped = insn_value; + + if ((insn_value_cropped & CGEN_INSN_BASE_MASK (insn)) + == CGEN_INSN_BASE_VALUE (insn)) + { + /* Printing is handled in two passes. The first pass parses the + machine insn and extracts the fields. The second pass prints + them. */ + + /* Make sure the entire insn is loaded into insn_value, if it + can fit. */ + if (((unsigned) CGEN_INSN_BITSIZE (insn) > cd->base_insn_bitsize) && + (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long)) + { + unsigned long full_insn_value; + int rc = read_insn (cd, pc, info, buf, + CGEN_INSN_BITSIZE (insn) / 8, + & ex_info, & full_insn_value); + if (rc != 0) + return rc; + length = CGEN_EXTRACT_FN (cd, insn) + (cd, insn, &ex_info, full_insn_value, &fields, pc); + } + else + length = CGEN_EXTRACT_FN (cd, insn) + (cd, insn, &ex_info, insn_value_cropped, &fields, pc); + + /* length < 0 -> error */ + if (length < 0) + return length; + if (length > 0) + { + CGEN_PRINT_FN (cd, insn) (cd, info, insn, &fields, pc, length); + /* length is in bits, result is in bytes */ + return length / 8; + } + } + + insn_list = CGEN_DIS_NEXT_INSN (insn_list); + } + + return 0; +} + +/* Default value for CGEN_PRINT_INSN. + The result is the size of the insn in bytes or zero for an unknown insn + or -1 if an error occured fetching bytes. */ + +#ifndef CGEN_PRINT_INSN +#define CGEN_PRINT_INSN default_print_insn +#endif + +static int +default_print_insn (cd, pc, info) + CGEN_CPU_DESC cd; + bfd_vma pc; + disassemble_info *info; +{ + char buf[CGEN_MAX_INSN_SIZE]; + int buflen; + int status; + + /* Attempt to read the base part of the insn. */ + buflen = cd->base_insn_bitsize / 8; + status = (*info->read_memory_func) (pc, buf, buflen, info); + + /* Try again with the minimum part, if min < base. */ + if (status != 0 && (cd->min_insn_bitsize < cd->base_insn_bitsize)) + { + buflen = cd->min_insn_bitsize / 8; + status = (*info->read_memory_func) (pc, buf, buflen, info); + } + + if (status != 0) + { + (*info->memory_error_func) (status, pc, info); + return -1; + } + + return print_insn (cd, pc, info, buf, buflen); +} + +/* Main entry point. + Print one instruction from PC on INFO->STREAM. + Return the size of the instruction (in bytes). */ + +int +print_insn_xstormy16 (pc, info) + bfd_vma pc; + disassemble_info *info; +{ + static CGEN_CPU_DESC cd = 0; + static int prev_isa; + static int prev_mach; + static int prev_endian; + int length; + int isa,mach; + int endian = (info->endian == BFD_ENDIAN_BIG + ? CGEN_ENDIAN_BIG + : CGEN_ENDIAN_LITTLE); + enum bfd_architecture arch; + + /* ??? gdb will set mach but leave the architecture as "unknown" */ +#ifndef CGEN_BFD_ARCH +#define CGEN_BFD_ARCH bfd_arch_xstormy16 +#endif + arch = info->arch; + if (arch == bfd_arch_unknown) + arch = CGEN_BFD_ARCH; + + /* There's no standard way to compute the machine or isa number + so we leave it to the target. */ +#ifdef CGEN_COMPUTE_MACH + mach = CGEN_COMPUTE_MACH (info); +#else + mach = info->mach; +#endif + +#ifdef CGEN_COMPUTE_ISA + isa = CGEN_COMPUTE_ISA (info); +#else + isa = 0; +#endif + + /* If we've switched cpu's, close the current table and open a new one. */ + if (cd + && (isa != prev_isa + || mach != prev_mach + || endian != prev_endian)) + { + xstormy16_cgen_cpu_close (cd); + cd = 0; + } + + /* If we haven't initialized yet, initialize the opcode table. */ + if (! cd) + { + const bfd_arch_info_type *arch_type = bfd_lookup_arch (arch, mach); + const char *mach_name; + + if (!arch_type) + abort (); + mach_name = arch_type->printable_name; + + prev_isa = isa; + prev_mach = mach; + prev_endian = endian; + cd = xstormy16_cgen_cpu_open (CGEN_CPU_OPEN_ISAS, prev_isa, + CGEN_CPU_OPEN_BFDMACH, mach_name, + CGEN_CPU_OPEN_ENDIAN, prev_endian, + CGEN_CPU_OPEN_END); + if (!cd) + abort (); + xstormy16_cgen_init_dis (cd); + } + + /* We try to have as much common code as possible. + But at this point some targets need to take over. */ + /* ??? Some targets may need a hook elsewhere. Try to avoid this, + but if not possible try to move this hook elsewhere rather than + have two hooks. */ + length = CGEN_PRINT_INSN (cd, pc, info); + if (length > 0) + return length; + if (length < 0) + return -1; + + (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG); + return cd->default_insn_bitsize / 8; +} diff --git a/opcodes/xstormy16-ibld.c b/opcodes/xstormy16-ibld.c new file mode 100644 index 000000000..2304514db --- /dev/null +++ b/opcodes/xstormy16-ibld.c @@ -0,0 +1,1246 @@ +/* Instruction building/extraction support for xstormy16. -*- C -*- + +THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator. +- the resultant file is machine generated, cgen-ibld.in isn't + +Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + +This file is part of the GNU Binutils and GDB, the GNU debugger. + +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, 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. */ + +/* ??? Eventually more and more of this stuff can go to cpu-independent files. + Keep that in mind. */ + +#include "sysdep.h" +#include +#include "ansidecl.h" +#include "dis-asm.h" +#include "bfd.h" +#include "symcat.h" +#include "xstormy16-desc.h" +#include "xstormy16-opc.h" +#include "opintl.h" +#include "safe-ctype.h" + +#undef min +#define min(a,b) ((a) < (b) ? (a) : (b)) +#undef max +#define max(a,b) ((a) > (b) ? (a) : (b)) + +/* Used by the ifield rtx function. */ +#define FLD(f) (fields->f) + +static const char * insert_normal + PARAMS ((CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR)); +static const char * insert_insn_normal + PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, + CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma)); +static int extract_normal + PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, + unsigned int, unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int, bfd_vma, long *)); +static int extract_insn_normal + PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *, + CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma)); +#if CGEN_INT_INSN_P +static void put_insn_int_value + PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT)); +#endif +#if ! CGEN_INT_INSN_P +static CGEN_INLINE void insert_1 + PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *)); +static CGEN_INLINE int fill_cache + PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma)); +static CGEN_INLINE long extract_1 + PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, + unsigned char *, bfd_vma)); +#endif + +/* Operand insertion. */ + +#if ! CGEN_INT_INSN_P + +/* Subroutine of insert_normal. */ + +static CGEN_INLINE void +insert_1 (cd, value, start, length, word_length, bufp) + CGEN_CPU_DESC cd; + unsigned long value; + int start,length,word_length; + unsigned char *bufp; +{ + unsigned long x,mask; + int shift; + + x = cgen_get_insn_value (cd, bufp, word_length); + + /* Written this way to avoid undefined behaviour. */ + mask = (((1L << (length - 1)) - 1) << 1) | 1; + if (CGEN_INSN_LSB0_P) + shift = (start + 1) - length; + else + shift = (word_length - (start + length)); + x = (x & ~(mask << shift)) | ((value & mask) << shift); + + cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x); +} + +#endif /* ! CGEN_INT_INSN_P */ + +/* Default insertion routine. + + ATTRS is a mask of the boolean attributes. + WORD_OFFSET is the offset in bits from the start of the insn of the value. + WORD_LENGTH is the length of the word in bits in which the value resides. + START is the starting bit number in the word, architecture origin. + LENGTH is the length of VALUE in bits. + TOTAL_LENGTH is the total length of the insn in bits. + + The result is an error message or NULL if success. */ + +/* ??? This duplicates functionality with bfd's howto table and + bfd_install_relocation. */ +/* ??? This doesn't handle bfd_vma's. Create another function when + necessary. */ + +static const char * +insert_normal (cd, value, attrs, word_offset, start, length, word_length, + total_length, buffer) + CGEN_CPU_DESC cd; + long value; + unsigned int attrs; + unsigned int word_offset, start, length, word_length, total_length; + CGEN_INSN_BYTES_PTR buffer; +{ + static char errbuf[100]; + /* Written this way to avoid undefined behaviour. */ + unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1; + + /* If LENGTH is zero, this operand doesn't contribute to the value. */ + if (length == 0) + return NULL; + +#if 0 + if (CGEN_INT_INSN_P + && word_offset != 0) + abort (); +#endif + + if (word_length > 32) + abort (); + + /* For architectures with insns smaller than the base-insn-bitsize, + word_length may be too big. */ + if (cd->min_insn_bitsize < cd->base_insn_bitsize) + { + if (word_offset == 0 + && word_length > total_length) + word_length = total_length; + } + + /* Ensure VALUE will fit. */ + if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT)) + { + long minval = - (1L << (length - 1)); + unsigned long maxval = mask; + + if ((value > 0 && (unsigned long) value > maxval) + || value < minval) + { + /* xgettext:c-format */ + sprintf (errbuf, + _("operand out of range (%ld not between %ld and %lu)"), + value, minval, maxval); + return errbuf; + } + } + else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)) + { + unsigned long maxval = mask; + + if ((unsigned long) value > maxval) + { + /* xgettext:c-format */ + sprintf (errbuf, + _("operand out of range (%lu not between 0 and %lu)"), + value, maxval); + return errbuf; + } + } + else + { + if (! cgen_signed_overflow_ok_p (cd)) + { + long minval = - (1L << (length - 1)); + long maxval = (1L << (length - 1)) - 1; + + if (value < minval || value > maxval) + { + sprintf + /* xgettext:c-format */ + (errbuf, _("operand out of range (%ld not between %ld and %ld)"), + value, minval, maxval); + return errbuf; + } + } + } + +#if CGEN_INT_INSN_P + + { + int shift; + + if (CGEN_INSN_LSB0_P) + shift = (word_offset + start + 1) - length; + else + shift = total_length - (word_offset + start + length); + *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift); + } + +#else /* ! CGEN_INT_INSN_P */ + + { + unsigned char *bufp = (unsigned char *) buffer + word_offset / 8; + + insert_1 (cd, value, start, length, word_length, bufp); + } + +#endif /* ! CGEN_INT_INSN_P */ + + return NULL; +} + +/* Default insn builder (insert handler). + The instruction is recorded in CGEN_INT_INSN_P byte order (meaning + that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is + recorded in host byte order, otherwise BUFFER is an array of bytes + and the value is recorded in target byte order). + The result is an error message or NULL if success. */ + +static const char * +insert_insn_normal (cd, insn, fields, buffer, pc) + CGEN_CPU_DESC cd; + const CGEN_INSN * insn; + CGEN_FIELDS * fields; + CGEN_INSN_BYTES_PTR buffer; + bfd_vma pc; +{ + const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); + unsigned long value; + const CGEN_SYNTAX_CHAR_TYPE * syn; + + CGEN_INIT_INSERT (cd); + value = CGEN_INSN_BASE_VALUE (insn); + + /* If we're recording insns as numbers (rather than a string of bytes), + target byte order handling is deferred until later. */ + +#if CGEN_INT_INSN_P + + put_insn_int_value (cd, buffer, cd->base_insn_bitsize, + CGEN_FIELDS_BITSIZE (fields), value); + +#else + + cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize, + (unsigned) CGEN_FIELDS_BITSIZE (fields)), + value); + +#endif /* ! CGEN_INT_INSN_P */ + + /* ??? It would be better to scan the format's fields. + Still need to be able to insert a value based on the operand though; + e.g. storing a branch displacement that got resolved later. + Needs more thought first. */ + + for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn) + { + const char *errmsg; + + if (CGEN_SYNTAX_CHAR_P (* syn)) + continue; + + errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn), + fields, buffer, pc); + if (errmsg) + return errmsg; + } + + return NULL; +} + +#if CGEN_INT_INSN_P +/* Cover function to store an insn value into an integral insn. Must go here + because it needs -desc.h for CGEN_INT_INSN_P. */ + +static void +put_insn_int_value (cd, buf, length, insn_length, value) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + CGEN_INSN_BYTES_PTR buf; + int length; + int insn_length; + CGEN_INSN_INT value; +{ + /* For architectures with insns smaller than the base-insn-bitsize, + length may be too big. */ + if (length > insn_length) + *buf = value; + else + { + int shift = insn_length - length; + /* Written this way to avoid undefined behaviour. */ + CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1; + *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift); + } +} +#endif + +/* Operand extraction. */ + +#if ! CGEN_INT_INSN_P + +/* Subroutine of extract_normal. + Ensure sufficient bytes are cached in EX_INFO. + OFFSET is the offset in bytes from the start of the insn of the value. + BYTES is the length of the needed value. + Returns 1 for success, 0 for failure. */ + +static CGEN_INLINE int +fill_cache (cd, ex_info, offset, bytes, pc) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + CGEN_EXTRACT_INFO *ex_info; + int offset, bytes; + bfd_vma pc; +{ + /* It's doubtful that the middle part has already been fetched so + we don't optimize that case. kiss. */ + unsigned int mask; + disassemble_info *info = (disassemble_info *) ex_info->dis_info; + + /* First do a quick check. */ + mask = (1 << bytes) - 1; + if (((ex_info->valid >> offset) & mask) == mask) + return 1; + + /* Search for the first byte we need to read. */ + for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1) + if (! (mask & ex_info->valid)) + break; + + if (bytes) + { + int status; + + pc += offset; + status = (*info->read_memory_func) + (pc, ex_info->insn_bytes + offset, bytes, info); + + if (status != 0) + { + (*info->memory_error_func) (status, pc, info); + return 0; + } + + ex_info->valid |= ((1 << bytes) - 1) << offset; + } + + return 1; +} + +/* Subroutine of extract_normal. */ + +static CGEN_INLINE long +extract_1 (cd, ex_info, start, length, word_length, bufp, pc) + CGEN_CPU_DESC cd; + CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED; + int start,length,word_length; + unsigned char *bufp; + bfd_vma pc ATTRIBUTE_UNUSED; +{ + unsigned long x; + int shift; +#if 0 + int big_p = CGEN_CPU_INSN_ENDIAN (cd) == CGEN_ENDIAN_BIG; +#endif + x = cgen_get_insn_value (cd, bufp, word_length); + + if (CGEN_INSN_LSB0_P) + shift = (start + 1) - length; + else + shift = (word_length - (start + length)); + return x >> shift; +} + +#endif /* ! CGEN_INT_INSN_P */ + +/* Default extraction routine. + + INSN_VALUE is the first base_insn_bitsize bits of the insn in host order, + or sometimes less for cases like the m32r where the base insn size is 32 + but some insns are 16 bits. + ATTRS is a mask of the boolean attributes. We only need `SIGNED', + but for generality we take a bitmask of all of them. + WORD_OFFSET is the offset in bits from the start of the insn of the value. + WORD_LENGTH is the length of the word in bits in which the value resides. + START is the starting bit number in the word, architecture origin. + LENGTH is the length of VALUE in bits. + TOTAL_LENGTH is the total length of the insn in bits. + + Returns 1 for success, 0 for failure. */ + +/* ??? The return code isn't properly used. wip. */ + +/* ??? This doesn't handle bfd_vma's. Create another function when + necessary. */ + +static int +extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length, + word_length, total_length, pc, valuep) + CGEN_CPU_DESC cd; +#if ! CGEN_INT_INSN_P + CGEN_EXTRACT_INFO *ex_info; +#else + CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED; +#endif + CGEN_INSN_INT insn_value; + unsigned int attrs; + unsigned int word_offset, start, length, word_length, total_length; +#if ! CGEN_INT_INSN_P + bfd_vma pc; +#else + bfd_vma pc ATTRIBUTE_UNUSED; +#endif + long *valuep; +{ + long value, mask; + + /* If LENGTH is zero, this operand doesn't contribute to the value + so give it a standard value of zero. */ + if (length == 0) + { + *valuep = 0; + return 1; + } + +#if 0 + if (CGEN_INT_INSN_P + && word_offset != 0) + abort (); +#endif + + if (word_length > 32) + abort (); + + /* For architectures with insns smaller than the insn-base-bitsize, + word_length may be too big. */ + if (cd->min_insn_bitsize < cd->base_insn_bitsize) + { + if (word_offset == 0 + && word_length > total_length) + word_length = total_length; + } + + /* Does the value reside in INSN_VALUE, and at the right alignment? */ + + if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length)) + { + if (CGEN_INSN_LSB0_P) + value = insn_value >> ((word_offset + start + 1) - length); + else + value = insn_value >> (total_length - ( word_offset + start + length)); + } + +#if ! CGEN_INT_INSN_P + + else + { + unsigned char *bufp = ex_info->insn_bytes + word_offset / 8; + + if (word_length > 32) + abort (); + + if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0) + return 0; + + value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc); + } + +#endif /* ! CGEN_INT_INSN_P */ + + /* Written this way to avoid undefined behaviour. */ + mask = (((1L << (length - 1)) - 1) << 1) | 1; + + value &= mask; + /* sign extend? */ + if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED) + && (value & (1L << (length - 1)))) + value |= ~mask; + + *valuep = value; + + return 1; +} + +/* Default insn extractor. + + INSN_VALUE is the first base_insn_bitsize bits, translated to host order. + The extracted fields are stored in FIELDS. + EX_INFO is used to handle reading variable length insns. + Return the length of the insn in bits, or 0 if no match, + or -1 if an error occurs fetching data (memory_error_func will have + been called). */ + +static int +extract_insn_normal (cd, insn, ex_info, insn_value, fields, pc) + CGEN_CPU_DESC cd; + const CGEN_INSN *insn; + CGEN_EXTRACT_INFO *ex_info; + CGEN_INSN_INT insn_value; + CGEN_FIELDS *fields; + bfd_vma pc; +{ + const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn); + const CGEN_SYNTAX_CHAR_TYPE *syn; + + CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn); + + CGEN_INIT_EXTRACT (cd); + + for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn) + { + int length; + + if (CGEN_SYNTAX_CHAR_P (*syn)) + continue; + + length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn), + ex_info, insn_value, fields, pc); + if (length <= 0) + return length; + } + + /* We recognized and successfully extracted this insn. */ + return CGEN_INSN_BITSIZE (insn); +} + +/* machine generated code added here */ + +const char * xstormy16_cgen_insert_operand + PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma)); + +/* Main entry point for operand insertion. + + This function is basically just a big switch statement. Earlier versions + used tables to look up the function to use, but + - if the table contains both assembler and disassembler functions then + the disassembler contains much of the assembler and vice-versa, + - there's a lot of inlining possibilities as things grow, + - using a switch statement avoids the function call overhead. + + This function could be moved into `parse_insn_normal', but keeping it + separate makes clear the interface between `parse_insn_normal' and each of + the handlers. It's also needed by GAS to insert operands that couldn't be + resolved during parsing. */ + +const char * +xstormy16_cgen_insert_operand (cd, opindex, fields, buffer, pc) + CGEN_CPU_DESC cd; + int opindex; + CGEN_FIELDS * fields; + CGEN_INSN_BYTES_PTR buffer; + bfd_vma pc ATTRIBUTE_UNUSED; +{ + const char * errmsg = NULL; + unsigned int total_length = CGEN_FIELDS_BITSIZE (fields); + + switch (opindex) + { + case XSTORMY16_OPERAND_RB : + errmsg = insert_normal (cd, fields->f_Rb, 0, 0, 17, 3, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_RBJ : + errmsg = insert_normal (cd, fields->f_Rbj, 0, 0, 11, 1, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_RD : + errmsg = insert_normal (cd, fields->f_Rd, 0, 0, 12, 4, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_RDM : + errmsg = insert_normal (cd, fields->f_Rdm, 0, 0, 13, 3, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_RM : + errmsg = insert_normal (cd, fields->f_Rm, 0, 0, 4, 3, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_RS : + errmsg = insert_normal (cd, fields->f_Rs, 0, 0, 8, 4, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_ABS24 : + { +{ + FLD (f_abs24_1) = ((FLD (f_abs24)) & (255)); + FLD (f_abs24_2) = ((unsigned int) (FLD (f_abs24)) >> (8)); +} + errmsg = insert_normal (cd, fields->f_abs24_1, 0, 0, 8, 8, 32, total_length, buffer); + if (errmsg) + break; + errmsg = insert_normal (cd, fields->f_abs24_2, 0, 0, 16, 16, 32, total_length, buffer); + if (errmsg) + break; + } + break; + case XSTORMY16_OPERAND_BCOND2 : + errmsg = insert_normal (cd, fields->f_op2, 0, 0, 4, 4, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_BCOND5 : + errmsg = insert_normal (cd, fields->f_op5, 0, 0, 16, 4, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_HMEM8 : + { + long value = fields->f_hmem8; + value = ((value) - (32512)); + errmsg = insert_normal (cd, value, 0|(1<f_imm12, 0|(1<f_imm16, 0|(1<f_imm2, 0, 0, 10, 2, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_IMM3 : + errmsg = insert_normal (cd, fields->f_imm3, 0, 0, 4, 3, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_IMM3B : + errmsg = insert_normal (cd, fields->f_imm3b, 0, 0, 17, 3, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_IMM4 : + errmsg = insert_normal (cd, fields->f_imm4, 0, 0, 8, 4, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_IMM8 : + errmsg = insert_normal (cd, fields->f_imm8, 0, 0, 8, 8, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_IMM8SMALL : + errmsg = insert_normal (cd, fields->f_imm8, 0, 0, 8, 8, 32, total_length, buffer); + break; + case XSTORMY16_OPERAND_LMEM8 : + errmsg = insert_normal (cd, fields->f_lmem8, 0|(1<f_rel12; + value = ((value) - (((pc) + (4)))); + errmsg = insert_normal (cd, value, 0|(1<f_rel12a; + value = ((int) (((value) - (((pc) + (2))))) >> (1)); + errmsg = insert_normal (cd, value, 0|(1<f_rel8_2; + value = ((value) - (((pc) + (2)))); + errmsg = insert_normal (cd, value, 0|(1<f_rel8_4; + value = ((value) - (((pc) + (4)))); + errmsg = insert_normal (cd, value, 0|(1<f_op2m, 0, 0, 7, 1, 32, total_length, buffer); + break; + + default : + /* xgettext:c-format */ + fprintf (stderr, _("Unrecognized field %d while building insn.\n"), + opindex); + abort (); + } + + return errmsg; +} + +int xstormy16_cgen_extract_operand + PARAMS ((CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, + CGEN_FIELDS *, bfd_vma)); + +/* Main entry point for operand extraction. + The result is <= 0 for error, >0 for success. + ??? Actual values aren't well defined right now. + + This function is basically just a big switch statement. Earlier versions + used tables to look up the function to use, but + - if the table contains both assembler and disassembler functions then + the disassembler contains much of the assembler and vice-versa, + - there's a lot of inlining possibilities as things grow, + - using a switch statement avoids the function call overhead. + + This function could be moved into `print_insn_normal', but keeping it + separate makes clear the interface between `print_insn_normal' and each of + the handlers. */ + +int +xstormy16_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc) + CGEN_CPU_DESC cd; + int opindex; + CGEN_EXTRACT_INFO *ex_info; + CGEN_INSN_INT insn_value; + CGEN_FIELDS * fields; + bfd_vma pc; +{ + /* Assume success (for those operands that are nops). */ + int length = 1; + unsigned int total_length = CGEN_FIELDS_BITSIZE (fields); + + switch (opindex) + { + case XSTORMY16_OPERAND_RB : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 3, 32, total_length, pc, & fields->f_Rb); + break; + case XSTORMY16_OPERAND_RBJ : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_Rbj); + break; + case XSTORMY16_OPERAND_RD : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_Rd); + break; + case XSTORMY16_OPERAND_RDM : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 13, 3, 32, total_length, pc, & fields->f_Rdm); + break; + case XSTORMY16_OPERAND_RM : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 3, 32, total_length, pc, & fields->f_Rm); + break; + case XSTORMY16_OPERAND_RS : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_Rs); + break; + case XSTORMY16_OPERAND_ABS24 : + { + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_abs24_1); + if (length <= 0) break; + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & fields->f_abs24_2); + if (length <= 0) break; + FLD (f_abs24) = ((((FLD (f_abs24_2)) << (8))) | (FLD (f_abs24_1))); + } + break; + case XSTORMY16_OPERAND_BCOND2 : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_op2); + break; + case XSTORMY16_OPERAND_BCOND5 : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 4, 32, total_length, pc, & fields->f_op5); + break; + case XSTORMY16_OPERAND_HMEM8 : + { + long value; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_hmem8 = value; + } + break; + case XSTORMY16_OPERAND_IMM12 : + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_imm12); + break; + case XSTORMY16_OPERAND_IMM16 : + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_imm16); + break; + case XSTORMY16_OPERAND_IMM2 : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_imm2); + break; + case XSTORMY16_OPERAND_IMM3 : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 3, 32, total_length, pc, & fields->f_imm3); + break; + case XSTORMY16_OPERAND_IMM3B : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 3, 32, total_length, pc, & fields->f_imm3b); + break; + case XSTORMY16_OPERAND_IMM4 : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_imm4); + break; + case XSTORMY16_OPERAND_IMM8 : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_imm8); + break; + case XSTORMY16_OPERAND_IMM8SMALL : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_imm8); + break; + case XSTORMY16_OPERAND_LMEM8 : + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_lmem8); + break; + case XSTORMY16_OPERAND_REL12 : + { + long value; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_rel12 = value; + } + break; + case XSTORMY16_OPERAND_REL12A : + { + long value; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_rel12a = value; + } + break; + case XSTORMY16_OPERAND_REL8_2 : + { + long value; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_rel8_2 = value; + } + break; + case XSTORMY16_OPERAND_REL8_4 : + { + long value; + length = extract_normal (cd, ex_info, insn_value, 0|(1<f_rel8_4 = value; + } + break; + case XSTORMY16_OPERAND_WS2 : + length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_op2m); + break; + + default : + /* xgettext:c-format */ + fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"), + opindex); + abort (); + } + + return length; +} + +cgen_insert_fn * const xstormy16_cgen_insert_handlers[] = +{ + insert_insn_normal, +}; + +cgen_extract_fn * const xstormy16_cgen_extract_handlers[] = +{ + extract_insn_normal, +}; + +int xstormy16_cgen_get_int_operand + PARAMS ((CGEN_CPU_DESC, int, const CGEN_FIELDS *)); +bfd_vma xstormy16_cgen_get_vma_operand + PARAMS ((CGEN_CPU_DESC, int, const CGEN_FIELDS *)); + +/* Getting values from cgen_fields is handled by a collection of functions. + They are distinguished by the type of the VALUE argument they return. + TODO: floating point, inlining support, remove cases where result type + not appropriate. */ + +int +xstormy16_cgen_get_int_operand (cd, opindex, fields) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + int opindex; + const CGEN_FIELDS * fields; +{ + int value; + + switch (opindex) + { + case XSTORMY16_OPERAND_RB : + value = fields->f_Rb; + break; + case XSTORMY16_OPERAND_RBJ : + value = fields->f_Rbj; + break; + case XSTORMY16_OPERAND_RD : + value = fields->f_Rd; + break; + case XSTORMY16_OPERAND_RDM : + value = fields->f_Rdm; + break; + case XSTORMY16_OPERAND_RM : + value = fields->f_Rm; + break; + case XSTORMY16_OPERAND_RS : + value = fields->f_Rs; + break; + case XSTORMY16_OPERAND_ABS24 : + value = fields->f_abs24; + break; + case XSTORMY16_OPERAND_BCOND2 : + value = fields->f_op2; + break; + case XSTORMY16_OPERAND_BCOND5 : + value = fields->f_op5; + break; + case XSTORMY16_OPERAND_HMEM8 : + value = fields->f_hmem8; + break; + case XSTORMY16_OPERAND_IMM12 : + value = fields->f_imm12; + break; + case XSTORMY16_OPERAND_IMM16 : + value = fields->f_imm16; + break; + case XSTORMY16_OPERAND_IMM2 : + value = fields->f_imm2; + break; + case XSTORMY16_OPERAND_IMM3 : + value = fields->f_imm3; + break; + case XSTORMY16_OPERAND_IMM3B : + value = fields->f_imm3b; + break; + case XSTORMY16_OPERAND_IMM4 : + value = fields->f_imm4; + break; + case XSTORMY16_OPERAND_IMM8 : + value = fields->f_imm8; + break; + case XSTORMY16_OPERAND_IMM8SMALL : + value = fields->f_imm8; + break; + case XSTORMY16_OPERAND_LMEM8 : + value = fields->f_lmem8; + break; + case XSTORMY16_OPERAND_REL12 : + value = fields->f_rel12; + break; + case XSTORMY16_OPERAND_REL12A : + value = fields->f_rel12a; + break; + case XSTORMY16_OPERAND_REL8_2 : + value = fields->f_rel8_2; + break; + case XSTORMY16_OPERAND_REL8_4 : + value = fields->f_rel8_4; + break; + case XSTORMY16_OPERAND_WS2 : + value = fields->f_op2m; + break; + + default : + /* xgettext:c-format */ + fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"), + opindex); + abort (); + } + + return value; +} + +bfd_vma +xstormy16_cgen_get_vma_operand (cd, opindex, fields) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + int opindex; + const CGEN_FIELDS * fields; +{ + bfd_vma value; + + switch (opindex) + { + case XSTORMY16_OPERAND_RB : + value = fields->f_Rb; + break; + case XSTORMY16_OPERAND_RBJ : + value = fields->f_Rbj; + break; + case XSTORMY16_OPERAND_RD : + value = fields->f_Rd; + break; + case XSTORMY16_OPERAND_RDM : + value = fields->f_Rdm; + break; + case XSTORMY16_OPERAND_RM : + value = fields->f_Rm; + break; + case XSTORMY16_OPERAND_RS : + value = fields->f_Rs; + break; + case XSTORMY16_OPERAND_ABS24 : + value = fields->f_abs24; + break; + case XSTORMY16_OPERAND_BCOND2 : + value = fields->f_op2; + break; + case XSTORMY16_OPERAND_BCOND5 : + value = fields->f_op5; + break; + case XSTORMY16_OPERAND_HMEM8 : + value = fields->f_hmem8; + break; + case XSTORMY16_OPERAND_IMM12 : + value = fields->f_imm12; + break; + case XSTORMY16_OPERAND_IMM16 : + value = fields->f_imm16; + break; + case XSTORMY16_OPERAND_IMM2 : + value = fields->f_imm2; + break; + case XSTORMY16_OPERAND_IMM3 : + value = fields->f_imm3; + break; + case XSTORMY16_OPERAND_IMM3B : + value = fields->f_imm3b; + break; + case XSTORMY16_OPERAND_IMM4 : + value = fields->f_imm4; + break; + case XSTORMY16_OPERAND_IMM8 : + value = fields->f_imm8; + break; + case XSTORMY16_OPERAND_IMM8SMALL : + value = fields->f_imm8; + break; + case XSTORMY16_OPERAND_LMEM8 : + value = fields->f_lmem8; + break; + case XSTORMY16_OPERAND_REL12 : + value = fields->f_rel12; + break; + case XSTORMY16_OPERAND_REL12A : + value = fields->f_rel12a; + break; + case XSTORMY16_OPERAND_REL8_2 : + value = fields->f_rel8_2; + break; + case XSTORMY16_OPERAND_REL8_4 : + value = fields->f_rel8_4; + break; + case XSTORMY16_OPERAND_WS2 : + value = fields->f_op2m; + break; + + default : + /* xgettext:c-format */ + fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"), + opindex); + abort (); + } + + return value; +} + +void xstormy16_cgen_set_int_operand + PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, int)); +void xstormy16_cgen_set_vma_operand + PARAMS ((CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma)); + +/* Stuffing values in cgen_fields is handled by a collection of functions. + They are distinguished by the type of the VALUE argument they accept. + TODO: floating point, inlining support, remove cases where argument type + not appropriate. */ + +void +xstormy16_cgen_set_int_operand (cd, opindex, fields, value) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + int opindex; + CGEN_FIELDS * fields; + int value; +{ + switch (opindex) + { + case XSTORMY16_OPERAND_RB : + fields->f_Rb = value; + break; + case XSTORMY16_OPERAND_RBJ : + fields->f_Rbj = value; + break; + case XSTORMY16_OPERAND_RD : + fields->f_Rd = value; + break; + case XSTORMY16_OPERAND_RDM : + fields->f_Rdm = value; + break; + case XSTORMY16_OPERAND_RM : + fields->f_Rm = value; + break; + case XSTORMY16_OPERAND_RS : + fields->f_Rs = value; + break; + case XSTORMY16_OPERAND_ABS24 : + fields->f_abs24 = value; + break; + case XSTORMY16_OPERAND_BCOND2 : + fields->f_op2 = value; + break; + case XSTORMY16_OPERAND_BCOND5 : + fields->f_op5 = value; + break; + case XSTORMY16_OPERAND_HMEM8 : + fields->f_hmem8 = value; + break; + case XSTORMY16_OPERAND_IMM12 : + fields->f_imm12 = value; + break; + case XSTORMY16_OPERAND_IMM16 : + fields->f_imm16 = value; + break; + case XSTORMY16_OPERAND_IMM2 : + fields->f_imm2 = value; + break; + case XSTORMY16_OPERAND_IMM3 : + fields->f_imm3 = value; + break; + case XSTORMY16_OPERAND_IMM3B : + fields->f_imm3b = value; + break; + case XSTORMY16_OPERAND_IMM4 : + fields->f_imm4 = value; + break; + case XSTORMY16_OPERAND_IMM8 : + fields->f_imm8 = value; + break; + case XSTORMY16_OPERAND_IMM8SMALL : + fields->f_imm8 = value; + break; + case XSTORMY16_OPERAND_LMEM8 : + fields->f_lmem8 = value; + break; + case XSTORMY16_OPERAND_REL12 : + fields->f_rel12 = value; + break; + case XSTORMY16_OPERAND_REL12A : + fields->f_rel12a = value; + break; + case XSTORMY16_OPERAND_REL8_2 : + fields->f_rel8_2 = value; + break; + case XSTORMY16_OPERAND_REL8_4 : + fields->f_rel8_4 = value; + break; + case XSTORMY16_OPERAND_WS2 : + fields->f_op2m = value; + break; + + default : + /* xgettext:c-format */ + fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"), + opindex); + abort (); + } +} + +void +xstormy16_cgen_set_vma_operand (cd, opindex, fields, value) + CGEN_CPU_DESC cd ATTRIBUTE_UNUSED; + int opindex; + CGEN_FIELDS * fields; + bfd_vma value; +{ + switch (opindex) + { + case XSTORMY16_OPERAND_RB : + fields->f_Rb = value; + break; + case XSTORMY16_OPERAND_RBJ : + fields->f_Rbj = value; + break; + case XSTORMY16_OPERAND_RD : + fields->f_Rd = value; + break; + case XSTORMY16_OPERAND_RDM : + fields->f_Rdm = value; + break; + case XSTORMY16_OPERAND_RM : + fields->f_Rm = value; + break; + case XSTORMY16_OPERAND_RS : + fields->f_Rs = value; + break; + case XSTORMY16_OPERAND_ABS24 : + fields->f_abs24 = value; + break; + case XSTORMY16_OPERAND_BCOND2 : + fields->f_op2 = value; + break; + case XSTORMY16_OPERAND_BCOND5 : + fields->f_op5 = value; + break; + case XSTORMY16_OPERAND_HMEM8 : + fields->f_hmem8 = value; + break; + case XSTORMY16_OPERAND_IMM12 : + fields->f_imm12 = value; + break; + case XSTORMY16_OPERAND_IMM16 : + fields->f_imm16 = value; + break; + case XSTORMY16_OPERAND_IMM2 : + fields->f_imm2 = value; + break; + case XSTORMY16_OPERAND_IMM3 : + fields->f_imm3 = value; + break; + case XSTORMY16_OPERAND_IMM3B : + fields->f_imm3b = value; + break; + case XSTORMY16_OPERAND_IMM4 : + fields->f_imm4 = value; + break; + case XSTORMY16_OPERAND_IMM8 : + fields->f_imm8 = value; + break; + case XSTORMY16_OPERAND_IMM8SMALL : + fields->f_imm8 = value; + break; + case XSTORMY16_OPERAND_LMEM8 : + fields->f_lmem8 = value; + break; + case XSTORMY16_OPERAND_REL12 : + fields->f_rel12 = value; + break; + case XSTORMY16_OPERAND_REL12A : + fields->f_rel12a = value; + break; + case XSTORMY16_OPERAND_REL8_2 : + fields->f_rel8_2 = value; + break; + case XSTORMY16_OPERAND_REL8_4 : + fields->f_rel8_4 = value; + break; + case XSTORMY16_OPERAND_WS2 : + fields->f_op2m = value; + break; + + default : + /* xgettext:c-format */ + fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"), + opindex); + abort (); + } +} + +/* Function to call before using the instruction builder tables. */ + +void +xstormy16_cgen_init_ibld_table (cd) + CGEN_CPU_DESC cd; +{ + cd->insert_handlers = & xstormy16_cgen_insert_handlers[0]; + cd->extract_handlers = & xstormy16_cgen_extract_handlers[0]; + + cd->insert_operand = xstormy16_cgen_insert_operand; + cd->extract_operand = xstormy16_cgen_extract_operand; + + cd->get_int_operand = xstormy16_cgen_get_int_operand; + cd->set_int_operand = xstormy16_cgen_set_int_operand; + cd->get_vma_operand = xstormy16_cgen_get_vma_operand; + cd->set_vma_operand = xstormy16_cgen_set_vma_operand; +} diff --git a/opcodes/xstormy16-opc.c b/opcodes/xstormy16-opc.c new file mode 100644 index 000000000..c4dc9c00b --- /dev/null +++ b/opcodes/xstormy16-opc.c @@ -0,0 +1,1171 @@ +/* Instruction opcode table for xstormy16. + +THIS FILE IS MACHINE GENERATED WITH CGEN. + +Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + +This file is part of the GNU Binutils and/or GDB, the GNU debugger. + +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, 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 "sysdep.h" +#include "ansidecl.h" +#include "bfd.h" +#include "symcat.h" +#include "xstormy16-desc.h" +#include "xstormy16-opc.h" +#include "libiberty.h" + +/* The hash functions are recorded here to help keep assembler code out of + the disassembler and vice versa. */ + +static int asm_hash_insn_p PARAMS ((const CGEN_INSN *)); +static unsigned int asm_hash_insn PARAMS ((const char *)); +static int dis_hash_insn_p PARAMS ((const CGEN_INSN *)); +static unsigned int dis_hash_insn PARAMS ((const char *, CGEN_INSN_INT)); + +/* Instruction formats. */ + +#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) +#define F(f) & xstormy16_cgen_ifld_table[XSTORMY16_##f] +#else +#define F(f) & xstormy16_cgen_ifld_table[XSTORMY16_/**/f] +#endif +static const CGEN_IFMT ifmt_empty = { + 0, 0, 0x0, { { 0 } } +}; + +static const CGEN_IFMT ifmt_movlmemimm = { + 32, 32, 0xfe000000, { { F (F_OP1) }, { F (F_OP2A) }, { F (F_OP2M) }, { F (F_LMEM8) }, { F (F_IMM16) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movhmemimm = { + 32, 32, 0xfe000000, { { F (F_OP1) }, { F (F_OP2A) }, { F (F_OP2M) }, { F (F_HMEM8) }, { F (F_IMM16) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movlgrmem = { + 16, 16, 0xf000, { { F (F_OP1) }, { F (F_RM) }, { F (F_OP2M) }, { F (F_LMEM8) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movhgrmem = { + 16, 16, 0xf000, { { F (F_OP1) }, { F (F_RM) }, { F (F_OP2M) }, { F (F_HMEM8) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movgrgri = { + 16, 16, 0xfe08, { { F (F_OP1) }, { F (F_OP2A) }, { F (F_OP2M) }, { F (F_RS) }, { F (F_OP4M) }, { F (F_RDM) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movgrgrii = { + 32, 32, 0xfe08f000, { { F (F_OP1) }, { F (F_OP2A) }, { F (F_OP2M) }, { F (F_RS) }, { F (F_OP4M) }, { F (F_RDM) }, { F (F_OP5) }, { F (F_IMM12) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movgrgr = { + 16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_RS) }, { F (F_RD) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movwimm8 = { + 16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_IMM8) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movwgrimm8 = { + 16, 16, 0xf100, { { F (F_OP1) }, { F (F_RM) }, { F (F_OP2M) }, { F (F_IMM8) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movwgrimm16 = { + 32, 32, 0xfff00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_RD) }, { F (F_IMM16) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movlowgr = { + 16, 16, 0xfff0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_RD) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movfgrgrii = { + 32, 32, 0xfe088000, { { F (F_OP1) }, { F (F_OP2A) }, { F (F_OP2M) }, { F (F_RS) }, { F (F_OP4M) }, { F (F_RDM) }, { F (F_OP5A) }, { F (F_RB) }, { F (F_IMM12) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_addgrimm4 = { + 16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_IMM4) }, { F (F_RD) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_incgrimm2 = { + 16, 16, 0xffc0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3A) }, { F (F_IMM2) }, { F (F_RD) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_set1lmemimm = { + 16, 16, 0xf100, { { F (F_OP1) }, { F (F_IMM3) }, { F (F_OP2M) }, { F (F_LMEM8) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_set1hmemimm = { + 16, 16, 0xf100, { { F (F_OP1) }, { F (F_IMM3) }, { F (F_OP2M) }, { F (F_HMEM8) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_bccgrgr = { + 32, 32, 0xff000000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_RS) }, { F (F_RD) }, { F (F_OP5) }, { F (F_REL12) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_bccgrimm8 = { + 32, 32, 0xf1000000, { { F (F_OP1) }, { F (F_RM) }, { F (F_OP2M) }, { F (F_IMM8) }, { F (F_OP5) }, { F (F_REL12) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_bccimm16 = { + 32, 32, 0xf0000000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_REL8_4) }, { F (F_IMM16) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_bngrimm4 = { + 32, 32, 0xff00f000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_IMM4) }, { F (F_RD) }, { F (F_OP5) }, { F (F_REL12) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_bngrgr = { + 32, 32, 0xff00f000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_RS) }, { F (F_RD) }, { F (F_OP5) }, { F (F_REL12) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_bnlmemimm = { + 32, 32, 0xff008000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_LMEM8) }, { F (F_OP5A) }, { F (F_IMM3B) }, { F (F_REL12) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_bnhmemimm = { + 32, 32, 0xff008000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_HMEM8) }, { F (F_OP5A) }, { F (F_IMM3B) }, { F (F_REL12) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_bcc = { + 16, 16, 0xf000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_REL8_2) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_br = { + 16, 16, 0xf001, { { F (F_OP1) }, { F (F_REL12A) }, { F (F_OP4B) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_jmp = { + 16, 16, 0xffe0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3B) }, { F (F_RBJ) }, { F (F_RD) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_jmpf = { + 32, 32, 0xff000000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_ABS24) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_iret = { + 16, 16, 0xffff, { { F (F_OP) }, { 0 } } +}; + +#undef F + +#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) +#define A(a) (1 << CGEN_INSN_##a) +#else +#define A(a) (1 << CGEN_INSN_/**/a) +#endif +#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) +#define OPERAND(op) XSTORMY16_OPERAND_##op +#else +#define OPERAND(op) XSTORMY16_OPERAND_/**/op +#endif +#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ +#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) + +/* The instruction table. */ + +static const CGEN_OPCODE xstormy16_cgen_insn_opcode_table[MAX_INSNS] = +{ + /* Special null first entry. + A `num' value of zero is thus invalid. + Also, the special `invalid' insn resides here. */ + { { 0, 0, 0, 0 }, {{0}}, 0, {0}}, +/* mov$ws2 $lmem8,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (LMEM8), ',', '#', OP (IMM16), 0 } }, + & ifmt_movlmemimm, { 0x78000000 } + }, +/* mov$ws2 $hmem8,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (HMEM8), ',', '#', OP (IMM16), 0 } }, + & ifmt_movhmemimm, { 0x7a000000 } + }, +/* mov$ws2 $Rm,$lmem8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RM), ',', OP (LMEM8), 0 } }, + & ifmt_movlgrmem, { 0x8000 } + }, +/* mov$ws2 $Rm,$hmem8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RM), ',', OP (HMEM8), 0 } }, + & ifmt_movhgrmem, { 0xa000 } + }, +/* mov$ws2 $lmem8,$Rm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (LMEM8), ',', OP (RM), 0 } }, + & ifmt_movlgrmem, { 0x9000 } + }, +/* mov$ws2 $hmem8,$Rm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (HMEM8), ',', OP (RM), 0 } }, + & ifmt_movhgrmem, { 0xb000 } + }, +/* mov$ws2 $Rdm,($Rs) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', OP (RS), ')', 0 } }, + & ifmt_movgrgri, { 0x7000 } + }, +/* mov$ws2 $Rdm,($Rs++) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', OP (RS), '+', '+', ')', 0 } }, + & ifmt_movgrgri, { 0x6000 } + }, +/* mov$ws2 $Rdm,(--$Rs) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', '-', '-', OP (RS), ')', 0 } }, + & ifmt_movgrgri, { 0x6800 } + }, +/* mov$ws2 ($Rs),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', OP (RS), ')', ',', OP (RDM), 0 } }, + & ifmt_movgrgri, { 0x7200 } + }, +/* mov$ws2 ($Rs++),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', OP (RS), '+', '+', ')', ',', OP (RDM), 0 } }, + & ifmt_movgrgri, { 0x6200 } + }, +/* mov$ws2 (--$Rs),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', '-', '-', OP (RS), ')', ',', OP (RDM), 0 } }, + & ifmt_movgrgri, { 0x6a00 } + }, +/* mov$ws2 $Rdm,($Rs,$imm12) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', OP (RS), ',', OP (IMM12), ')', 0 } }, + & ifmt_movgrgrii, { 0x70080000 } + }, +/* mov$ws2 $Rdm,($Rs++,$imm12) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', OP (RS), '+', '+', ',', OP (IMM12), ')', 0 } }, + & ifmt_movgrgrii, { 0x60080000 } + }, +/* mov$ws2 $Rdm,(--$Rs,$imm12) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', '-', '-', OP (RS), ',', OP (IMM12), ')', 0 } }, + & ifmt_movgrgrii, { 0x68080000 } + }, +/* mov$ws2 ($Rs,$imm12),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', OP (RS), ',', OP (IMM12), ')', ',', OP (RDM), 0 } }, + & ifmt_movgrgrii, { 0x72080000 } + }, +/* mov$ws2 ($Rs++,$imm12),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', OP (RS), '+', '+', ',', OP (IMM12), ')', ',', OP (RDM), 0 } }, + & ifmt_movgrgrii, { 0x62080000 } + }, +/* mov$ws2 (--$Rs,$imm12),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', '-', '-', OP (RS), ',', OP (IMM12), ')', ',', OP (RDM), 0 } }, + & ifmt_movgrgrii, { 0x6a080000 } + }, +/* mov $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x4600 } + }, +/* mov.w Rx,#$imm8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', 'R', 'x', ',', '#', OP (IMM8), 0 } }, + & ifmt_movwimm8, { 0x4700 } + }, +/* mov.w $Rm,#$imm8small */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RM), ',', '#', OP (IMM8SMALL), 0 } }, + & ifmt_movwgrimm8, { 0x2100 } + }, +/* mov.w $Rd,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM16), 0 } }, + & ifmt_movwgrimm16, { 0x31300000 } + }, +/* mov.b $Rd,RxL */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', 'R', 'x', 'L', 0 } }, + & ifmt_movlowgr, { 0x30c0 } + }, +/* mov.b $Rd,RxH */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', 'R', 'x', 'H', 0 } }, + & ifmt_movlowgr, { 0x30d0 } + }, +/* movf$ws2 $Rdm,($Rs) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', OP (RS), ')', 0 } }, + & ifmt_movgrgri, { 0x7400 } + }, +/* movf$ws2 $Rdm,($Rs++) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', OP (RS), '+', '+', ')', 0 } }, + & ifmt_movgrgri, { 0x6400 } + }, +/* movf$ws2 $Rdm,(--$Rs) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', '-', '-', OP (RS), ')', 0 } }, + & ifmt_movgrgri, { 0x6c00 } + }, +/* movf$ws2 ($Rs),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', OP (RS), ')', ',', OP (RDM), 0 } }, + & ifmt_movgrgri, { 0x7600 } + }, +/* movf$ws2 ($Rs++),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', OP (RS), '+', '+', ')', ',', OP (RDM), 0 } }, + & ifmt_movgrgri, { 0x6600 } + }, +/* movf$ws2 (--$Rs),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', '-', '-', OP (RS), ')', ',', OP (RDM), 0 } }, + & ifmt_movgrgri, { 0x6e00 } + }, +/* movf$ws2 $Rdm,($Rb,$Rs,$imm12) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', OP (RB), ',', OP (RS), ',', OP (IMM12), ')', 0 } }, + & ifmt_movfgrgrii, { 0x74080000 } + }, +/* movf$ws2 $Rdm,($Rb,$Rs++,$imm12) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', OP (RB), ',', OP (RS), '+', '+', ',', OP (IMM12), ')', 0 } }, + & ifmt_movfgrgrii, { 0x64080000 } + }, +/* movf$ws2 $Rdm,($Rb,--$Rs,$imm12) */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', OP (RDM), ',', '(', OP (RB), ',', '-', '-', OP (RS), ',', OP (IMM12), ')', 0 } }, + & ifmt_movfgrgrii, { 0x6c080000 } + }, +/* movf$ws2 ($Rb,$Rs,$imm12),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', OP (RB), ',', OP (RS), ',', OP (IMM12), ')', ',', OP (RDM), 0 } }, + & ifmt_movfgrgrii, { 0x76080000 } + }, +/* movf$ws2 ($Rb,$Rs++,$imm12),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', OP (RB), ',', OP (RS), '+', '+', ',', OP (IMM12), ')', ',', OP (RDM), 0 } }, + & ifmt_movfgrgrii, { 0x66080000 } + }, +/* movf$ws2 ($Rb,--$Rs,$imm12),$Rdm */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (WS2), ' ', '(', OP (RB), ',', '-', '-', OP (RS), ',', OP (IMM12), ')', ',', OP (RDM), 0 } }, + & ifmt_movfgrgrii, { 0x6e080000 } + }, +/* mask $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x3300 } + }, +/* mask $Rd,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM16), 0 } }, + & ifmt_movwgrimm16, { 0x30e00000 } + }, +/* push $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x80 } + }, +/* pop $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x90 } + }, +/* swpn $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x3090 } + }, +/* swpb $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x3080 } + }, +/* swpw $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x3200 } + }, +/* and $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x4000 } + }, +/* and Rx,#$imm8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', 'R', 'x', ',', '#', OP (IMM8), 0 } }, + & ifmt_movwimm8, { 0x4100 } + }, +/* and $Rd,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM16), 0 } }, + & ifmt_movwgrimm16, { 0x31000000 } + }, +/* or $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x4200 } + }, +/* or Rx,#$imm8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', 'R', 'x', ',', '#', OP (IMM8), 0 } }, + & ifmt_movwimm8, { 0x4300 } + }, +/* or $Rd,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM16), 0 } }, + & ifmt_movwgrimm16, { 0x31100000 } + }, +/* xor $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x4400 } + }, +/* xor Rx,#$imm8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', 'R', 'x', ',', '#', OP (IMM8), 0 } }, + & ifmt_movwimm8, { 0x4500 } + }, +/* xor $Rd,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM16), 0 } }, + & ifmt_movwgrimm16, { 0x31200000 } + }, +/* not $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x30b0 } + }, +/* add $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x4900 } + }, +/* add $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x5100 } + }, +/* add Rx,#$imm8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', 'R', 'x', ',', '#', OP (IMM8), 0 } }, + & ifmt_movwimm8, { 0x5900 } + }, +/* add $Rd,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM16), 0 } }, + & ifmt_movwgrimm16, { 0x31400000 } + }, +/* adc $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x4b00 } + }, +/* adc $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x5300 } + }, +/* adc Rx,#$imm8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', 'R', 'x', ',', '#', OP (IMM8), 0 } }, + & ifmt_movwimm8, { 0x5b00 } + }, +/* adc $Rd,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM16), 0 } }, + & ifmt_movwgrimm16, { 0x31500000 } + }, +/* sub $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x4d00 } + }, +/* sub $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x5500 } + }, +/* sub Rx,#$imm8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', 'R', 'x', ',', '#', OP (IMM8), 0 } }, + & ifmt_movwimm8, { 0x5d00 } + }, +/* sub $Rd,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM16), 0 } }, + & ifmt_movwgrimm16, { 0x31600000 } + }, +/* sbc $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x4f00 } + }, +/* sbc $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x5700 } + }, +/* sbc Rx,#$imm8 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', 'R', 'x', ',', '#', OP (IMM8), 0 } }, + & ifmt_movwimm8, { 0x5f00 } + }, +/* sbc $Rd,#$imm16 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM16), 0 } }, + & ifmt_movwgrimm16, { 0x31700000 } + }, +/* inc $Rd,#$imm2 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM2), 0 } }, + & ifmt_incgrimm2, { 0x3000 } + }, +/* dec $Rd,#$imm2 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM2), 0 } }, + & ifmt_incgrimm2, { 0x3040 } + }, +/* rrc $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x3800 } + }, +/* rrc $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x3900 } + }, +/* rlc $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x3a00 } + }, +/* rlc $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x3b00 } + }, +/* shr $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x3c00 } + }, +/* shr $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x3d00 } + }, +/* shl $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x3e00 } + }, +/* shl $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x3f00 } + }, +/* asr $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0x3600 } + }, +/* asr $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x3700 } + }, +/* set1 $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x900 } + }, +/* set1 $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0xb00 } + }, +/* set1 $lmem8,#$imm3 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (LMEM8), ',', '#', OP (IMM3), 0 } }, + & ifmt_set1lmemimm, { 0xe100 } + }, +/* set1 $hmem8,#$imm3 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (HMEM8), ',', '#', OP (IMM3), 0 } }, + & ifmt_set1hmemimm, { 0xf100 } + }, +/* clr1 $Rd,#$imm4 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), 0 } }, + & ifmt_addgrimm4, { 0x800 } + }, +/* clr1 $Rd,$Rs */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), 0 } }, + & ifmt_movgrgr, { 0xa00 } + }, +/* clr1 $lmem8,#$imm3 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (LMEM8), ',', '#', OP (IMM3), 0 } }, + & ifmt_set1lmemimm, { 0xe000 } + }, +/* clr1 $hmem8,#$imm3 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (HMEM8), ',', '#', OP (IMM3), 0 } }, + & ifmt_set1hmemimm, { 0xf000 } + }, +/* cbw $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x30a0 } + }, +/* rev $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x30f0 } + }, +/* b$bcond5 $Rd,$Rs,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (BCOND5), ' ', OP (RD), ',', OP (RS), ',', OP (REL12), 0 } }, + & ifmt_bccgrgr, { 0xd000000 } + }, +/* b$bcond5 $Rm,#$imm8,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (BCOND5), ' ', OP (RM), ',', '#', OP (IMM8), ',', OP (REL12), 0 } }, + & ifmt_bccgrimm8, { 0x20000000 } + }, +/* b$bcond2 Rx,#$imm16,${rel8-4} */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (BCOND2), ' ', 'R', 'x', ',', '#', OP (IMM16), ',', OP (REL8_4), 0 } }, + & ifmt_bccimm16, { 0xc0000000 } + }, +/* bn $Rd,#$imm4,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), ',', OP (REL12), 0 } }, + & ifmt_bngrimm4, { 0x4000000 } + }, +/* bn $Rd,$Rs,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (REL12), 0 } }, + & ifmt_bngrgr, { 0x6000000 } + }, +/* bn $lmem8,#$imm3b,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (LMEM8), ',', '#', OP (IMM3B), ',', OP (REL12), 0 } }, + & ifmt_bnlmemimm, { 0x7c000000 } + }, +/* bn $hmem8,#$imm3b,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (HMEM8), ',', '#', OP (IMM3B), ',', OP (REL12), 0 } }, + & ifmt_bnhmemimm, { 0x7e000000 } + }, +/* bp $Rd,#$imm4,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', '#', OP (IMM4), ',', OP (REL12), 0 } }, + & ifmt_bngrimm4, { 0x5000000 } + }, +/* bp $Rd,$Rs,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), ',', OP (RS), ',', OP (REL12), 0 } }, + & ifmt_bngrgr, { 0x7000000 } + }, +/* bp $lmem8,#$imm3b,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (LMEM8), ',', '#', OP (IMM3B), ',', OP (REL12), 0 } }, + & ifmt_bnlmemimm, { 0x7d000000 } + }, +/* bp $hmem8,#$imm3b,$rel12 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (HMEM8), ',', '#', OP (IMM3B), ',', OP (REL12), 0 } }, + & ifmt_bnhmemimm, { 0x7f000000 } + }, +/* b$bcond2 ${rel8-2} */ + { + { 0, 0, 0, 0 }, + { { MNEM, OP (BCOND2), ' ', OP (REL8_2), 0 } }, + & ifmt_bcc, { 0xd000 } + }, +/* br $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x20 } + }, +/* br $rel12a */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (REL12A), 0 } }, + & ifmt_br, { 0x1000 } + }, +/* jmp $Rbj,$Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RBJ), ',', OP (RD), 0 } }, + & ifmt_jmp, { 0x40 } + }, +/* jmpf $abs24 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (ABS24), 0 } }, + & ifmt_jmpf, { 0x2000000 } + }, +/* callr $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x10 } + }, +/* callr $rel12a */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (REL12A), 0 } }, + & ifmt_br, { 0x1001 } + }, +/* call $Rbj,$Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RBJ), ',', OP (RD), 0 } }, + & ifmt_jmp, { 0xa0 } + }, +/* callf $abs24 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (ABS24), 0 } }, + & ifmt_jmpf, { 0x1000000 } + }, +/* icallr $Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RD), 0 } }, + & ifmt_movlowgr, { 0x30 } + }, +/* icall $Rbj,$Rd */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (RBJ), ',', OP (RD), 0 } }, + & ifmt_jmp, { 0x60 } + }, +/* icallf $abs24 */ + { + { 0, 0, 0, 0 }, + { { MNEM, ' ', OP (ABS24), 0 } }, + & ifmt_jmpf, { 0x3000000 } + }, +/* iret */ + { + { 0, 0, 0, 0 }, + { { MNEM, 0 } }, + & ifmt_iret, { 0x2 } + }, +/* ret */ + { + { 0, 0, 0, 0 }, + { { MNEM, 0 } }, + & ifmt_iret, { 0x3 } + }, +/* mul */ + { + { 0, 0, 0, 0 }, + { { MNEM, 0 } }, + & ifmt_iret, { 0xd0 } + }, +/* div */ + { + { 0, 0, 0, 0 }, + { { MNEM, 0 } }, + & ifmt_iret, { 0xc0 } + }, +/* nop */ + { + { 0, 0, 0, 0 }, + { { MNEM, 0 } }, + & ifmt_iret, { 0x0 } + }, +/* halt */ + { + { 0, 0, 0, 0 }, + { { MNEM, 0 } }, + & ifmt_iret, { 0x8 } + }, +/* hold */ + { + { 0, 0, 0, 0 }, + { { MNEM, 0 } }, + & ifmt_iret, { 0xa } + }, +/* brk */ + { + { 0, 0, 0, 0 }, + { { MNEM, 0 } }, + & ifmt_iret, { 0x5 } + }, +/* --unused-- */ + { + { 0, 0, 0, 0 }, + { { MNEM, 0 } }, + & ifmt_iret, { 0x1 } + }, +}; + +#undef A +#undef OPERAND +#undef MNEM +#undef OP + +/* Formats for ALIAS macro-insns. */ + +#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) +#define F(f) & xstormy16_cgen_ifld_table[XSTORMY16_##f] +#else +#define F(f) & xstormy16_cgen_ifld_table[XSTORMY16_/**/f] +#endif +static const CGEN_IFMT ifmt_movimm8 = { + 16, 16, 0xff00, { { F (F_OP1) }, { F (F_OP2) }, { F (F_IMM8) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movgrimm8 = { + 16, 16, 0xf100, { { F (F_OP1) }, { F (F_RM) }, { F (F_OP2M) }, { F (F_IMM8) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_movgrimm16 = { + 32, 32, 0xfff00000, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3) }, { F (F_RD) }, { F (F_IMM16) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_incgr = { + 16, 16, 0xfff0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3A) }, { F (F_IMM2) }, { F (F_RD) }, { 0 } } +}; + +static const CGEN_IFMT ifmt_decgr = { + 16, 16, 0xfff0, { { F (F_OP1) }, { F (F_OP2) }, { F (F_OP3A) }, { F (F_IMM2) }, { F (F_RD) }, { 0 } } +}; + +#undef F + +/* Each non-simple macro entry points to an array of expansion possibilities. */ + +#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) +#define A(a) (1 << CGEN_INSN_##a) +#else +#define A(a) (1 << CGEN_INSN_/**/a) +#endif +#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE) +#define OPERAND(op) XSTORMY16_OPERAND_##op +#else +#define OPERAND(op) XSTORMY16_OPERAND_/**/op +#endif +#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */ +#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field)) + +/* The macro instruction table. */ + +static const CGEN_IBASE xstormy16_cgen_macro_insn_table[] = +{ +/* mov Rx,#$imm8 */ + { + -1, "movimm8", "mov", 16, + { 0|A(ALIAS), { (1<macro_insn_table.init_entries = insns; + cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE); + cd->macro_insn_table.num_init_entries = num_macros; + + oc = & xstormy16_cgen_insn_opcode_table[0]; + insns = (CGEN_INSN *) cd->insn_table.init_entries; + for (i = 0; i < MAX_INSNS; ++i) + { + insns[i].opcode = &oc[i]; + xstormy16_cgen_build_insn_regex (& insns[i]); + } + + cd->sizeof_fields = sizeof (CGEN_FIELDS); + cd->set_fields_bitsize = set_fields_bitsize; + + cd->asm_hash_p = asm_hash_insn_p; + cd->asm_hash = asm_hash_insn; + cd->asm_hash_size = CGEN_ASM_HASH_SIZE; + + cd->dis_hash_p = dis_hash_insn_p; + cd->dis_hash = dis_hash_insn; + cd->dis_hash_size = CGEN_DIS_HASH_SIZE; +} diff --git a/opcodes/xstormy16-opc.h b/opcodes/xstormy16-opc.h new file mode 100644 index 000000000..551d26615 --- /dev/null +++ b/opcodes/xstormy16-opc.h @@ -0,0 +1,136 @@ +/* Instruction opcode header for xstormy16. + +THIS FILE IS MACHINE GENERATED WITH CGEN. + +Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + +This file is part of the GNU Binutils and/or GDB, the GNU debugger. + +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, 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. + +*/ + +#ifndef XSTORMY16_OPC_H +#define XSTORMY16_OPC_H + +/* -- opc.h */ + +/* Allows reason codes to be output when assembler errors occur. */ +#define CGEN_VERBOSE_ASSEMBLER_ERRORS + +/* We can't use the default hash size because many bits are used by + operands. */ +#define CGEN_DIS_HASH_SIZE 1 +#define CGEN_DIS_HASH(buf, value) 0 +/* -- */ +/* Enum declaration for xstormy16 instruction types. */ +typedef enum cgen_insn_type { + XSTORMY16_INSN_INVALID, XSTORMY16_INSN_MOVLMEMIMM, XSTORMY16_INSN_MOVHMEMIMM, XSTORMY16_INSN_MOVLGRMEM + , XSTORMY16_INSN_MOVHGRMEM, XSTORMY16_INSN_MOVLMEMGR, XSTORMY16_INSN_MOVHMEMGR, XSTORMY16_INSN_MOVGRGRI + , XSTORMY16_INSN_MOVGRGRIPOSTINC, XSTORMY16_INSN_MOVGRGRIPREDEC, XSTORMY16_INSN_MOVGRIGR, XSTORMY16_INSN_MOVGRIPOSTINCGR + , XSTORMY16_INSN_MOVGRIPREDECGR, XSTORMY16_INSN_MOVGRGRII, XSTORMY16_INSN_MOVGRGRIIPOSTINC, XSTORMY16_INSN_MOVGRGRIIPREDEC + , XSTORMY16_INSN_MOVGRIIGR, XSTORMY16_INSN_MOVGRIIPOSTINCGR, XSTORMY16_INSN_MOVGRIIPREDECGR, XSTORMY16_INSN_MOVGRGR + , XSTORMY16_INSN_MOVWIMM8, XSTORMY16_INSN_MOVWGRIMM8, XSTORMY16_INSN_MOVWGRIMM16, XSTORMY16_INSN_MOVLOWGR + , XSTORMY16_INSN_MOVHIGHGR, XSTORMY16_INSN_MOVFGRGRI, XSTORMY16_INSN_MOVFGRGRIPOSTINC, XSTORMY16_INSN_MOVFGRGRIPREDEC + , XSTORMY16_INSN_MOVFGRIGR, XSTORMY16_INSN_MOVFGRIPOSTINCGR, XSTORMY16_INSN_MOVFGRIPREDECGR, XSTORMY16_INSN_MOVFGRGRII + , XSTORMY16_INSN_MOVFGRGRIIPOSTINC, XSTORMY16_INSN_MOVFGRGRIIPREDEC, XSTORMY16_INSN_MOVFGRIIGR, XSTORMY16_INSN_MOVFGRIIPOSTINCGR + , XSTORMY16_INSN_MOVFGRIIPREDECGR, XSTORMY16_INSN_MASKGRGR, XSTORMY16_INSN_MASKGRIMM16, XSTORMY16_INSN_PUSHGR + , XSTORMY16_INSN_POPGR, XSTORMY16_INSN_SWPN, XSTORMY16_INSN_SWPB, XSTORMY16_INSN_SWPW + , XSTORMY16_INSN_ANDGRGR, XSTORMY16_INSN_ANDIMM8, XSTORMY16_INSN_ANDGRIMM16, XSTORMY16_INSN_ORGRGR + , XSTORMY16_INSN_ORIMM8, XSTORMY16_INSN_ORGRIMM16, XSTORMY16_INSN_XORGRGR, XSTORMY16_INSN_XORIMM8 + , XSTORMY16_INSN_XORGRIMM16, XSTORMY16_INSN_NOTGR, XSTORMY16_INSN_ADDGRGR, XSTORMY16_INSN_ADDGRIMM4 + , XSTORMY16_INSN_ADDIMM8, XSTORMY16_INSN_ADDGRIMM16, XSTORMY16_INSN_ADCGRGR, XSTORMY16_INSN_ADCGRIMM4 + , XSTORMY16_INSN_ADCIMM8, XSTORMY16_INSN_ADCGRIMM16, XSTORMY16_INSN_SUBGRGR, XSTORMY16_INSN_SUBGRIMM4 + , XSTORMY16_INSN_SUBIMM8, XSTORMY16_INSN_SUBGRIMM16, XSTORMY16_INSN_SBCGRGR, XSTORMY16_INSN_SBCGRIMM4 + , XSTORMY16_INSN_SBCGRIMM8, XSTORMY16_INSN_SBCGRIMM16, XSTORMY16_INSN_INCGRIMM2, XSTORMY16_INSN_DECGRIMM2 + , XSTORMY16_INSN_RRCGRGR, XSTORMY16_INSN_RRCGRIMM4, XSTORMY16_INSN_RLCGRGR, XSTORMY16_INSN_RLCGRIMM4 + , XSTORMY16_INSN_SHRGRGR, XSTORMY16_INSN_SHRGRIMM, XSTORMY16_INSN_SHLGRGR, XSTORMY16_INSN_SHLGRIMM + , XSTORMY16_INSN_ASRGRGR, XSTORMY16_INSN_ASRGRIMM, XSTORMY16_INSN_SET1GRIMM, XSTORMY16_INSN_SET1GRGR + , XSTORMY16_INSN_SET1LMEMIMM, XSTORMY16_INSN_SET1HMEMIMM, XSTORMY16_INSN_CLR1GRIMM, XSTORMY16_INSN_CLR1GRGR + , XSTORMY16_INSN_CLR1LMEMIMM, XSTORMY16_INSN_CLR1HMEMIMM, XSTORMY16_INSN_CBWGR, XSTORMY16_INSN_REVGR + , XSTORMY16_INSN_BCCGRGR, XSTORMY16_INSN_BCCGRIMM8, XSTORMY16_INSN_BCCIMM16, XSTORMY16_INSN_BNGRIMM4 + , XSTORMY16_INSN_BNGRGR, XSTORMY16_INSN_BNLMEMIMM, XSTORMY16_INSN_BNHMEMIMM, XSTORMY16_INSN_BPGRIMM4 + , XSTORMY16_INSN_BPGRGR, XSTORMY16_INSN_BPLMEMIMM, XSTORMY16_INSN_BPHMEMIMM, XSTORMY16_INSN_BCC + , XSTORMY16_INSN_BGR, XSTORMY16_INSN_BR, XSTORMY16_INSN_JMP, XSTORMY16_INSN_JMPF + , XSTORMY16_INSN_CALLRGR, XSTORMY16_INSN_CALLRIMM, XSTORMY16_INSN_CALLGR, XSTORMY16_INSN_CALLFIMM + , XSTORMY16_INSN_ICALLRGR, XSTORMY16_INSN_ICALLGR, XSTORMY16_INSN_ICALLFIMM, XSTORMY16_INSN_IRET + , XSTORMY16_INSN_RET, XSTORMY16_INSN_MUL, XSTORMY16_INSN_DIV, XSTORMY16_INSN_NOP + , XSTORMY16_INSN_HALT, XSTORMY16_INSN_HOLD, XSTORMY16_INSN_BRK, XSTORMY16_INSN_SYSCALL +} CGEN_INSN_TYPE; + +/* Index of `invalid' insn place holder. */ +#define CGEN_INSN_INVALID XSTORMY16_INSN_INVALID + +/* Total number of insns in table. */ +#define MAX_INSNS ((int) XSTORMY16_INSN_SYSCALL + 1) + +/* This struct records data prior to insertion or after extraction. */ +struct cgen_fields +{ + int length; + long f_nil; + long f_anyof; + long f_Rd; + long f_Rdm; + long f_Rm; + long f_Rs; + long f_Rb; + long f_Rbj; + long f_op1; + long f_op2; + long f_op2a; + long f_op2m; + long f_op3; + long f_op3a; + long f_op3b; + long f_op4; + long f_op4m; + long f_op4b; + long f_op5; + long f_op5a; + long f_op; + long f_imm2; + long f_imm3; + long f_imm3b; + long f_imm4; + long f_imm8; + long f_imm12; + long f_imm16; + long f_lmem8; + long f_hmem8; + long f_rel8_2; + long f_rel8_4; + long f_rel12; + long f_rel12a; + long f_abs24_1; + long f_abs24_2; + long f_abs24; +}; + +#define CGEN_INIT_PARSE(od) \ +{\ +} +#define CGEN_INIT_INSERT(od) \ +{\ +} +#define CGEN_INIT_EXTRACT(od) \ +{\ +} +#define CGEN_INIT_PRINT(od) \ +{\ +} + + +#endif /* XSTORMY16_OPC_H */ -- 2.11.4.GIT